Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't 'make' correctly. error: use of undeclared identifier 'CLOCK_REALTIME' / 'pow10' #26

Closed
eexyzhang opened this issue Oct 4, 2016 · 6 comments

Comments

@eexyzhang
Copy link

I pull the commit '876d844', and make under ./vmaf , I got the error msg as:


cd ptools; /Applications/Xcode.app/Contents/Developer/usr/bin/make libptools.so; cd ..;
g++ -Wall -Wextra -fpic -O -fno-strict-aliasing -DLINUX_ -DOC_NEW_STYLE_INCLUDES -Wno-deprecated -I./opencontainers_1_8_4/include -pthread -D_REENTRANT -c m2pythontools.cc
In file included from m2pythontools.cc:2:
In file included from ./m2pythontools.h:8:
In file included from ./opencontainers_1_8_4/include/ocarray.h:28:
In file included from ./opencontainers_1_8_4/include/ocstreamingpool.h:23:
./opencontainers_1_8_4/include/ocsynchronizer.h:96:1: warning: 'CondVar' defined as a struct here but previously declared as a class [-Wmismatched-tags]
struct CondVar {
^
./opencontainers_1_8_4/include/ocsynchronizer.h:20:1: note: did you mean struct here?
class CondVar; // Forward
^~~~~
struct
./opencontainers_1_8_4/include/ocsynchronizer.h:204:21: error: use of undeclared identifier 'CLOCK_REALTIME'
clock_gettime(CLOCK_REALTIME, &current_time);
^
In file included from m2pythontools.cc:2:
In file included from ./m2pythontools.h:8:
In file included from ./opencontainers_1_8_4/include/ocarray.h:27:
./opencontainers_1_8_4/include/ocport.h:793:20: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
INT z = INT(-1)<<((sizeof(INT)<<3)-1); // Largest negative int
~~~~~~~^
./opencontainers_1_8_4/include/ocport.h:814:60: note: in instantiation of function template specialization 'OC::StringizeInt' requested here
inline string Stringize<int_2> (const int_2& n) { return StringizeInt(n); }
^
./opencontainers_1_8_4/include/ocport.h:793:20: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
INT z = INT(-1)<<((sizeof(INT)<<3)-1); // Largest negative int
~~~~~~~^
./opencontainers_1_8_4/include/ocport.h:816:60: note: in instantiation of function template specialization 'OC::StringizeInt' requested here
inline string Stringize<int_4> (const int_4& n) { return StringizeInt(n); }
^
./opencontainers_1_8_4/include/ocport.h:793:20: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
INT z = INT(-1)<<((sizeof(INT)<<3)-1); // Largest negative int
~~~~~~~^
./opencontainers_1_8_4/include/ocport.h:818:60: note: in instantiation of function template specialization 'OC::StringizeInt' requested here
inline string Stringize<int_8> (const int_8& n) { return StringizeInt(n); }
^
4 warnings and 1 error generated.
make[1]: *** [m2pythontools.o] Error 1
for dir in feature libsvm wrapper; do
cd ${dir}; /Applications/Xcode.app/Contents/Developer/usr/bin/make; cd ..;
done
make[1]: Nothing to be done for all'. make[1]: Nothing to be done forall'.
c++ -c -o /Users/abc/Netflix_VMAF/vmaf/wrapper/obj/vmaf.o -std=c++11 -g -O3 -fPIC -w -Wextra -pedantic
-DOC_NEW_STYLE_INCLUDES -I /Users/abc/Netflix_VMAF/vmaf/wrapper/../ptools
-I /Users/abc/Netflix_VMAF/vmaf/wrapper/../ptools/opencontainers_1_8_4/include /Users/abc/Netflix_VMAF/vmaf/wrapper/src/vmaf.cpp
In file included from /Users/abc/Netflix_VMAF/vmaf/wrapper/src/vmaf.cpp:34:
In file included from /Users/abc/Netflix_VMAF/vmaf/wrapper/../ptools/chooseser.h:40:
In file included from /Users/abc/Netflix_VMAF/vmaf/wrapper/../ptools/valpython.h:6:
In file included from /Users/abc/Netflix_VMAF/vmaf/wrapper/../ptools/opencontainers_1_8_4/include/ocval.h:38:
In file included from /Users/abc/Netflix_VMAF/vmaf/wrapper/../ptools/opencontainers_1_8_4/include/ocavlhasht.h:38:
In file included from /Users/abc/Netflix_VMAF/vmaf/wrapper/../ptools/opencontainers_1_8_4/include/ocarray.h:28:
In file included from /Users/abc/Netflix_VMAF/vmaf/wrapper/../ptools/opencontainers_1_8_4/include/ocstreamingpool.h:23:
/Users/abc/Netflix_VMAF/vmaf/wrapper/../ptools/opencontainers_1_8_4/include/ocsynchronizer.h:204:21: error: use of undeclared identifier 'CLOCK_REALTIME'
clock_gettime(CLOCK_REALTIME, &current_time);
^
/Users/abc/Netflix_VMAF/vmaf/wrapper/src/vmaf.cpp:696:16: error: use of undeclared identifier 'pow10'
size_t m = pow10(digit);
^
2 errors generated.
make[1]: *** [/Users/abc/Netflix_VMAF/vmaf/wrapper/obj/vmaf.o] Error 1
cd libsvm; /Applications/Xcode.app/Contents/Developer/usr/bin/make lib; cd ..;
if [ "Darwin" = "Darwin" ]; then
SHARED_LIB_FLAG="-dynamiclib -Wl,-install_name,libsvm.so.2";
else
SHARED_LIB_FLAG="-shared -Wl,-soname,libsvm.so.2";
fi;
c++ ${SHARED_LIB_FLAG} svm.o -o libsvm.so.2

@li-zhi
Copy link
Collaborator

li-zhi commented Oct 4, 2016

@eexyzhang were you building under mac os?

@eexyzhang
Copy link
Author

yes. macOS Sierra.

@li-zhi
Copy link
Collaborator

li-zhi commented Oct 4, 2016

I see. I added a new library which I didn't test build under mac. I will try to fix this. In the mean while, feel free to build under linux, where it should work.

@li-zhi
Copy link
Collaborator

li-zhi commented Oct 5, 2016

@eexyzhang Try to pull master and make in Mac. It should work now.

@cchamchi
Copy link

cchamchi commented Oct 6, 2016

Thanks @li-zhi
I tested it under OSX El Capitan 10.11.2 and unittest is ok

@eexyzhang
Copy link
Author

I tested on macOS Sierra, it works now. Thanks!

@li-zhi li-zhi closed this as completed Oct 6, 2016
nilfm pushed a commit that referenced this issue Dec 8, 2022
…uminance-level-placeholder-christosb to master

* commit '58f22610108b1d3028707026b3761477cfade269':
  Add a check for luminance level being 100 cd/m2 for now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants