Giter Club home page Giter Club logo

Comments (8)

cielavenir avatar cielavenir commented on August 22, 2024

@sarthakpati somehow I don't reproduce it locally...

schnee:c tyamada$ pwd
/Users/tyamada/devel/pyppmd/build/lib.macosx-10.14-x86_64-3.9/pyppmd/c
schnee:c tyamada$ DYLD_FORCE_FLAT_NAMESPACE=1 DYLD_INSERT_LIBRARIES=/usr/local/opt/python/Frameworks/Python.framework/Versions/3.9/lib/libpython3.9.dylib dlsymtest _ppmd.cpython-39-darwin.so clock_gettime
dlopen(_ppmd.cpython-39-darwin.so) ok
filename = /Users/tyamada/devel/pyppmd/build/lib.macosx-10.14-x86_64-3.9/pyppmd/c/_ppmd.cpython-39-darwin.so
dlsym(clock_gettime) ok (/usr/lib/system/libsystem_c.dylib)
schnee:c tyamada$ nm --add-dyldinfo /usr/lib/libSystem.B.dylib|grep gettime
schnee:c tyamada$ nm --add-dyldinfo /usr/lib/system/libsystem_c.dylib|grep gettime
00000000000010fa T _clock_gettime
0000000000000f18 T _clock_gettime_nsec_np

from pyppmd.

cielavenir avatar cielavenir commented on August 22, 2024
schnee:pyppmd tyamada$ ag CLOCK_REALTIME /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/time.h
153:_CLOCK_REALTIME __CLOCK_AVAILABILITY = 0,
154:#define CLOCK_REALTIME _CLOCK_REALTIME

from pyppmd.

sarthakpati avatar sarthakpati commented on August 22, 2024

@cielavenir: can you try if #50 is working, too? I think that should fix whatever issue conda builds are seeing.

from pyppmd.

cielavenir avatar cielavenir commented on August 22, 2024

@sarthakpati actually your build failed

schnee:pyppmd tyamada$ git rev-parse HEAD
ce5ef4347bbf0f9d55107fad325937052f86c19d
schnee:pyppmd tyamada$ python3 setup.py bdist_wheel
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.14-x86_64-3.9
creating build/lib.macosx-10.14-x86_64-3.9/pyppmd
copying src/pyppmd/__init__.py -> build/lib.macosx-10.14-x86_64-3.9/pyppmd
package init file 'src/pyppmd/c/__init__.py' not found (or not a regular file)
creating build/lib.macosx-10.14-x86_64-3.9/pyppmd/c
copying src/pyppmd/c/c_ppmd.py -> build/lib.macosx-10.14-x86_64-3.9/pyppmd/c
copying src/pyppmd/__init__.pyi -> build/lib.macosx-10.14-x86_64-3.9/pyppmd
copying src/pyppmd/py.typed -> build/lib.macosx-10.14-x86_64-3.9/pyppmd
running build_ext
building 'pyppmd.c._ppmd' extension
creating build/temp.macosx-10.14-x86_64-3.9
creating build/temp.macosx-10.14-x86_64-3.9/lib
creating build/temp.macosx-10.14-x86_64-3.9/lib2
creating build/temp.macosx-10.14-x86_64-3.9/src
creating build/temp.macosx-10.14-x86_64-3.9/src/ext
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -Ilib -Ilib2 -I/usr/local/include -I/usr/local/opt/[email protected]/include -I/usr/local/opt/sqlite/include -I/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c lib/Ppmd7.c -o build/temp.macosx-10.14-x86_64-3.9/lib/Ppmd7.o
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -Ilib -Ilib2 -I/usr/local/include -I/usr/local/opt/[email protected]/include -I/usr/local/opt/sqlite/include -I/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c lib/Ppmd7Dec.c -o build/temp.macosx-10.14-x86_64-3.9/lib/Ppmd7Dec.o
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -Ilib -Ilib2 -I/usr/local/include -I/usr/local/opt/[email protected]/include -I/usr/local/opt/sqlite/include -I/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c lib/Ppmd7Enc.c -o build/temp.macosx-10.14-x86_64-3.9/lib/Ppmd7Enc.o
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -Ilib -Ilib2 -I/usr/local/include -I/usr/local/opt/[email protected]/include -I/usr/local/opt/sqlite/include -I/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c lib/Ppmd8.c -o build/temp.macosx-10.14-x86_64-3.9/lib/Ppmd8.o
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -Ilib -Ilib2 -I/usr/local/include -I/usr/local/opt/[email protected]/include -I/usr/local/opt/sqlite/include -I/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c lib/Ppmd8Dec.c -o build/temp.macosx-10.14-x86_64-3.9/lib/Ppmd8Dec.o
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -Ilib -Ilib2 -I/usr/local/include -I/usr/local/opt/[email protected]/include -I/usr/local/opt/sqlite/include -I/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c lib/Ppmd8Enc.c -o build/temp.macosx-10.14-x86_64-3.9/lib/Ppmd8Enc.o
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -Ilib -Ilib2 -I/usr/local/include -I/usr/local/opt/[email protected]/include -I/usr/local/opt/sqlite/include -I/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c lib2/Buffer.c -o build/temp.macosx-10.14-x86_64-3.9/lib2/Buffer.o
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -Ilib -Ilib2 -I/usr/local/include -I/usr/local/opt/[email protected]/include -I/usr/local/opt/sqlite/include -I/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c lib2/Ppmd8Tdecoder.c -o build/temp.macosx-10.14-x86_64-3.9/lib2/Ppmd8Tdecoder.o
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -Ilib -Ilib2 -I/usr/local/include -I/usr/local/opt/[email protected]/include -I/usr/local/opt/sqlite/include -I/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c lib2/threading.c -o build/temp.macosx-10.14-x86_64-3.9/lib2/threading.o
lib2/threading.c:115:7: error: use of undeclared identifier 'clock_serv_t'
      clock_serv_t cclock;
      ^
lib2/threading.c:116:7: error: use of undeclared identifier 'mach_timespec_t'
      mach_timespec_t mts;
      ^
lib2/threading.c:117:7: warning: implicit declaration of function 'host_get_clock_service' is invalid in C99 [-Wimplicit-function-declaration]
      host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
      ^
lib2/threading.c:117:30: warning: implicit declaration of function 'mach_host_self' is invalid in C99 [-Wimplicit-function-declaration]
      host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
                             ^
lib2/threading.c:117:48: error: use of undeclared identifier 'CALENDAR_CLOCK'
      host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
                                               ^
lib2/threading.c:117:65: error: use of undeclared identifier 'cclock'
      host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
                                                                ^
lib2/threading.c:118:7: warning: implicit declaration of function 'clock_get_time' is invalid in C99 [-Wimplicit-function-declaration]
      clock_get_time(cclock, &mts);
      ^
lib2/threading.c:118:22: error: use of undeclared identifier 'cclock'
      clock_get_time(cclock, &mts);
                     ^
lib2/threading.c:118:31: error: use of undeclared identifier 'mts'
      clock_get_time(cclock, &mts);
                              ^
lib2/threading.c:119:7: warning: implicit declaration of function 'mach_port_deallocate' is invalid in C99 [-Wimplicit-function-declaration]
      mach_port_deallocate(mach_task_self(), cclock);
      ^
lib2/threading.c:119:28: warning: implicit declaration of function 'mach_task_self' is invalid in C99 [-Wimplicit-function-declaration]
      mach_port_deallocate(mach_task_self(), cclock);
                           ^
lib2/threading.c:119:46: error: use of undeclared identifier 'cclock'; did you mean 'clock'?
      mach_port_deallocate(mach_task_self(), cclock);
                                             ^~~~~~
                                             clock
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/time.h:108:9: note: 'clock' declared here
clock_t clock(void) __DARWIN_ALIAS(clock);
        ^
lib2/threading.c:120:24: error: use of undeclared identifier 'mts'
      abstime.tv_sec = mts.tv_sec;
                       ^
lib2/threading.c:121:25: error: use of undeclared identifier 'mts'
      abstime.tv_nsec = mts.tv_nsec;
                        ^
5 warnings and 9 errors generated.
error: command '/usr/bin/clang' failed with exit code 1
schnee:pyppmd tyamada$ 

from pyppmd.

cielavenir avatar cielavenir commented on August 22, 2024

adding this to the head of threading.c worked

#ifdef __MACH__
#include <mach/clock.h>
#include <mach/mach.h>
#endif

from pyppmd.

cielavenir avatar cielavenir commented on August 22, 2024

ok I understand the situation.

your build OSX log says darwin13, which is macOS 10.9.

according to https://stackoverflow.com/questions/5167269/clock-gettime-alternative-in-mac-os-x, clock_gettime is supported from macOS 10.12.

so if you intend binary release for wider mac machines, I appreciate your change.

from pyppmd.

sarthakpati avatar sarthakpati commented on August 22, 2024

Can you check the PR now?

from pyppmd.

miurahr avatar miurahr commented on August 22, 2024

v0.16.1 is out with the fix.

from pyppmd.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.