openh264 icon indicating copy to clipboard operation
openh264 copied to clipboard

cannot build openh264 on Mac OS 10.6

Open sijchen opened this issue 11 years ago • 6 comments

on Mac OS 10.6.8: openh264-master mac$ make ARCH=i386 g++ -O3 -m32 -DX86_ASM -Wall -fPIC -MMD -MP -DGENERATED_VERSION_HEADER -I./codec/api/svc -I./codec/common/inc -c -o codec/common/src/common_tables.o codec/common/src/common_tables.cpp In file included from ./codec/common/inc/wels_common_defs.h:37, from codec/common/src/common_tables.cpp:33: ./codec/common/inc/typedefs.h:49:22: warning: inttypes.h: No such file or directory In file included from ./codec/common/inc/wels_common_defs.h:38, from codec/common/src/common_tables.cpp:33: ./codec/common/inc/macros.h:43:18: warning: math.h: No such file or directory ./codec/common/inc/macros.h:44:20: warning: assert.h: No such file or directory ./codec/common/inc/macros.h:45:20: warning: string.h: No such file or directory In file included from ./codec/common/inc/wels_common_defs.h:38, from codec/common/src/common_tables.cpp:33: ./codec/common/inc/macros.h: In function ‘void WelsSetMemMultiplebytes_c(void_, uint32_t, int32_t, int32_t)’: ./codec/common/inc/macros.h:301: error: ‘assert’ was not declared in this scope ./codec/common/inc/macros.h:310: error: ‘memset’ was not declared in this scope ./codec/common/inc/macros.h:313: error: ‘memset’ was not declared in this scope make: *_* [codec/common/src/common_tables.o] Error 1

sijchen avatar Mar 25 '15 02:03 sijchen

Unfortunately I do not have a 10.6 install but I find it a bit puzzling that includes like inttypes, math, assert and string cannot be found. Are you using the gcc from the XCode command line tools? Can you compile simple files like this?

(echo #include<inttypes.h> && echo int main(int argc, char** argv){ return 0; }) > main.c gcc main.c

Also, pasting the output of "g++ --version" would help.

ethanhugg avatar Mar 25 '15 03:03 ethanhugg

I found a Max OS 10.6, and tried adding "-isysroot {location_of_10.6_sdk}" into CFLAGS in platform-darwin.mk then the build error disappeared, and the .dylib files generated, but there is still link error when building the console.

Haven't tried the compile as in the above comments.

sijchen avatar Mar 25 '15 03:03 sijchen

Perhaps try adding it to LDFLAGS as well then. If that works we should put a note in the README for users still on OSX 10.6.

ethanhugg avatar Mar 25 '15 03:03 ethanhugg

adding "-isysroot {location_of_10.6_sdk}" to LDFLAGS as well will build the codec executive files. I ran a simple test with decoder in which it seems worked, but I did not have chance to run unit-test to did a full verification.

sijchen avatar Mar 26 '15 06:03 sijchen

This sounds like you have a broken system setup somehow. I never had to add -isysroot to compile command lines on OS X 10.6 in order to compile anything.

mstorsjo avatar Mar 26 '15 09:03 mstorsjo

okay then I will close this one.

sijchen avatar Mar 27 '15 01:03 sijchen