rainbowcreatures / FlashyWrappers

AIR / Flash video recording SDK
17 stars 10 forks source link

Compile openh264_release failed #18

Closed yzpTsubasa closed 6 years ago

yzpTsubasa commented 7 years ago

I used Crossbridge to compile openh264_release on Mac OS PATH=~/Projects/Crossbridge/sdk/usr/bin:$PATH make openh264_release FLASCC=~/Projects/Crossbridge/sdk ,these is the error:

-> Compile the C into abc - RELEASE "/Users/tsubasa/Projects/Crossbridge/sdk/usr/bin/g++" -DBOOST_ALL_NO_LIB -D__STDC_CONSTANT_MACROS -D__AVM2 -c -pthread -O4 -Wall ../common/boost_atomic/libs/atomic/src/lockpool.cpp -o lockpool.abc -I../common/boost_atomic/ ../common/boost_atomic/libs/atomic/src/lockpool.cpp:83: warning: missing braces around initializer for 'boost::atomics::detail::<unnamed>::padded_lock' ../common/boost_atomic/libs/atomic/src/lockpool.cpp:83: warning: missing braces around initializer for 'boost::atomics::detail::<unnamed>::padding<60u>' ../common/boost_atomic/libs/atomic/src/lockpool.cpp:83: warning: missing braces around initializer for 'char [60]' "/Users/tsubasa/Projects/Crossbridge/sdk/usr/bin/g++" -DBOOST_ALL_NO_LIB -D__STDC_CONSTANT_MACROS -D__AVM2 -c -pthread -O4 -Wall ../common/FW_exception.cpp -o fw_exception.abc "/Users/tsubasa/Projects/Crossbridge/sdk/usr/bin/g++" -DBOOST_ALL_NO_LIB -D__STDC_CONSTANT_MACROS -D__AVM2 -c -pthread -O4 -Wall ../common/FW_ffmpeg_IO.cpp -o fw_ffmpeg_IO.abc -I./ffmpeg_mp4_openh264_aac/include/ ../common/FW_ffmpeg_IO.cpp: In function 'int64_t seekFunction(void*, int64_t, int)': ../common/FW_ffmpeg_IO.cpp:39: warning: format '%d' expects type 'int', but argument 3 has type 'int64_t' "/Users/tsubasa/Projects/Crossbridge/sdk/usr/bin/g++" -DBOOST_ALL_NO_LIB -D__STDC_CONSTANT_MACROS -D__AVM2 -c -pthread -O4 -Wall ../common/FW_ffmpeg_encode.cpp -o fw_ffmpeg_encode_release.abc -I../common/boost_atomic/ -I./ffmpeg_mp4_openh264_aac/include/ ../common/FW_ffmpeg_encode.cpp: In member function 'void FW_ffmpeg_encode::write_audio_frame(AVFormatContext*, const uint8_t*, int, AVStream*)': ../common/FW_ffmpeg_encode.cpp:270: warning: deprecated conversion from string constant to 'char*' ../common/FW_ffmpeg_encode.cpp:286: warning: deprecated conversion from string constant to 'char*' ../common/FW_ffmpeg_encode.cpp:331: warning: deprecated conversion from string constant to 'char*' ../common/FW_ffmpeg_encode.cpp:337: warning: deprecated conversion from string constant to 'char*' ../common/FW_ffmpeg_encode.cpp:343: warning: comparison between signed and unsigned integer expressions ../common/FW_ffmpeg_encode.cpp:350: warning: deprecated conversion from string constant to 'char*' ../common/FW_ffmpeg_encode.cpp:353: warning: deprecated conversion from string constant to 'char*' ../common/FW_ffmpeg_encode.cpp:356: warning: deprecated conversion from string constant to 'char*' ../common/FW_ffmpeg_encode.cpp:377: warning: deprecated conversion from string constant to 'char*' ../common/FW_ffmpeg_encode.cpp:382: warning: deprecated conversion from string constant to 'char*' ../common/FW_ffmpeg_encode.cpp:394: warning: deprecated conversion from string constant to 'char*' ../common/FW_ffmpeg_encode.cpp: In member function 'void FW_ffmpeg_encode::write_video_frame(AVFormatContext*, unsigned char*, AVStream*)': ../common/FW_ffmpeg_encode.cpp:494: warning: deprecated conversion from string constant to 'char*' ../common/FW_ffmpeg_encode.cpp: In member function 'void FW_ffmpeg_encode::encode_it()': ../common/FW_ffmpeg_encode.cpp:641: warning: deprecated conversion from string constant to 'char*' ../common/FW_ffmpeg_encode.cpp:646: warning: deprecated conversion from string constant to 'char*' ../common/FW_ffmpeg_encode.cpp:653: warning: deprecated conversion from string constant to 'char*' ../common/FW_ffmpeg_encode.cpp:666: warning: deprecated conversion from string constant to 'char*' ../common/FW_ffmpeg_encode.cpp:678: warning: deprecated conversion from string constant to 'char*' ../common/FW_ffmpeg_encode.cpp: In member function 'int FW_ffmpeg_encode::finishInit()': ../common/FW_ffmpeg_encode.cpp:887: warning: deprecated conversion from string constant to 'char*' ../common/FW_ffmpeg_encode.cpp:930: warning: deprecated conversion from string constant to 'char*' ../common/FW_ffmpeg_encode.cpp: In member function 'void FW_ffmpeg_encode::configureRAMAdjuster(double, double)': ../common/FW_ffmpeg_encode.cpp:936: warning: deprecated conversion from string constant to 'char*' ../common/FW_ffmpeg_encode.cpp: In member function 'int FW_ffmpeg_encode::ffmpeg_init(unsigned char*, unsigned char*, unsigned char*, int, int, int, int, int, int, int, int, int, int, long unsigned int, int, int)': ../common/FW_ffmpeg_encode.cpp:960: warning: deprecated conversion from string constant to 'char*' ../common/FW_ffmpeg_encode.cpp:989: warning: deprecated conversion from string constant to 'char*' ../common/FW_ffmpeg_encode.cpp: In member function 'void FW_ffmpeg_encode::ffmpeg_finish()': ../common/FW_ffmpeg_encode.cpp:1039: warning: deprecated conversion from string constant to 'char*' ../common/FW_ffmpeg_encode.cpp: In member function 'std::stringstream* FW_ffmpeg_encode::ffmpeg_getStream()': ../common/FW_ffmpeg_encode.cpp:1049: warning: deprecated conversion from string constant to 'char*' ../common/FW_ffmpeg_encode.cpp: In member function 'bool FW_ffmpeg_encode::flush_intermediate_frames()': ../common/FW_ffmpeg_encode.cpp:1137: warning: comparison between signed and unsigned integer expressions ../common/FW_ffmpeg_encode.cpp:1143: warning: comparison between signed and unsigned integer expressions ../common/FW_ffmpeg_encode.cpp: In member function 'int FW_ffmpeg_encode::ffmpeg_addVideoData(unsigned char*, int)': ../common/FW_ffmpeg_encode.cpp:1191: warning: deprecated conversion from string constant to 'char*' ../common/FW_ffmpeg_encode.cpp:1205: warning: comparison between signed and unsigned integer expressions ../common/FW_ffmpeg_encode.cpp:1207: warning: deprecated conversion from string constant to 'char*' ../common/FW_ffmpeg_encode.cpp:1210: warning: comparison between signed and unsigned integer expressions ../common/FW_ffmpeg_encode.cpp:1211: warning: deprecated conversion from string constant to 'char*' ../common/FW_ffmpeg_encode.cpp:1214: warning: deprecated conversion from string constant to 'char*' ../common/FW_ffmpeg_encode.cpp:1230: warning: deprecated conversion from string constant to 'char*' ../common/FW_ffmpeg_encode.cpp: In member function 'bool FW_ffmpeg_encode::try_flushAndThread()': ../common/FW_ffmpeg_encode.cpp:1261: warning: deprecated conversion from string constant to 'char*' ../common/FW_ffmpeg_encode.cpp:1276: warning: deprecated conversion from string constant to 'char*' ../common/FW_ffmpeg_encode.cpp: In static member function 'static void* FW_ffmpeg_encode::runencoderthread(void*)': ../common/FW_ffmpeg_encode.cpp:1298: warning: no return statement in function returning non-void ../common/FW_ffmpeg_encode.cpp: In static member function 'static void* FW_ffmpeg_encode::runInitThread(void*)': ../common/FW_ffmpeg_encode.cpp:1310: warning: no return statement in function returning non-void ../common/FW_ffmpeg_encode.cpp: In member function 'void FW_ffmpeg_encode::ffmpeg_addAudioData(unsigned char*, int)': ../common/FW_ffmpeg_encode.cpp:1355: warning: deprecated conversion from string constant to 'char*' ../common/FW_ffmpeg_encode.cpp:1366: warning: deprecated conversion from string constant to 'char*' ../common/FW_ffmpeg_encode.cpp:1382: warning: deprecated conversion from string constant to 'char*' ../common/FW_ffmpeg_encode.cpp:1316: warning: unused variable 'millis2' ../common/FW_ffmpeg_encode.cpp: In static member function 'static void* FW_ffmpeg_encode::runInitThread(void*)': ../common/FW_ffmpeg_encode.cpp:1310: warning: control reaches end of non-void function ../common/FW_ffmpeg_encode.cpp: In static member function 'static void* FW_ffmpeg_encode::runencoderthread(void*)': ../common/FW_ffmpeg_encode.cpp:1298: warning: control reaches end of non-void function ../common/FW_ffmpeg_encode.cpp: In member function 'int FW_ffmpeg_encode::finishInit()': ../common/FW_ffmpeg_encode.cpp:931: warning: control reaches end of non-void function "/Users/tsubasa/Projects/Crossbridge/sdk/usr/bin/g++" -DBOOST_ALL_NO_LIB -D__STDC_CONSTANT_MACROS -D__AVM2 -c -pthread -O4 -Wall ../common/FW_ffmpeg_decode.cpp -o fw_ffmpeg_decode_release.abc -I../common/boost_atomic/ -I./ffmpeg_mp4_openh264_aac/include/ ../common/FW_ffmpeg_decode.cpp: In static member function 'static void* FW_ffmpeg_decode::rundecoderthread(void*)': ../common/FW_ffmpeg_decode.cpp:58: warning: no return statement in function returning non-void ../common/FW_ffmpeg_decode.cpp: In member function 'int FW_ffmpeg_decode::get_format_from_sample_fmt(const char**, AVSampleFormat)': ../common/FW_ffmpeg_decode.cpp:184: warning: comparison between signed and unsigned integer expressions ../common/FW_ffmpeg_decode.cpp: In member function 'int FW_ffmpeg_decode::bufferFrames()': ../common/FW_ffmpeg_decode.cpp:491: warning: control reaches end of non-void function ../common/FW_ffmpeg_decode.cpp: In static member function 'static void* FW_ffmpeg_decode::rundecoderthread(void*)': ../common/FW_ffmpeg_decode.cpp:58: warning: control reaches end of non-void function "/Users/tsubasa/Projects/Crossbridge/sdk/usr/bin/g++" -DBOOST_ALL_NO_LIB -D__STDC_CONSTANT_MACROS -D__AVM2 -c -pthread -O4 -Wall FW_wrapper.cpp -o fw_ffmpeg_encode_wrapper_release.abc -I../common/boost_atomic/ -I./ffmpeg_mp4_openh264_aac/include/ make link_openh264_release make[1]: Entering directory '/Volumes/C/Users/Administrator/Documents/Project/FlashyWrappers/FlasCC' -> Compiling openh264 encoder SWC "/Users/tsubasa/Projects/Crossbridge/sdk/usr/bin/g++" -D__STDC_CONSTANT_MACROS -D__AVM2 -O4 -Wall -pthread -O4 -Wall VFS.abc lockpool.abc fw_exception.abc fw_ffmpeg_encode_wrapper_release.abc fw_ffmpeg_encode_release.abc fw_ffmpeg_decode_release.abc fw_ffmpeg_IO.abc -emit-swc=com.fw_flascc -swf-version=17 -o fw_ffmpeg_encode_mp4_release.swc -L./ffmpeg_mp4_openh264_aac/lib/ -lswscale -lavformat -lavcodec -lavutil -lopenh264 -liconv /Users/tsubasa/Projects/Crossbridge/sdk/usr/bin/ld: warning: SWF version must be at least 18 to use pthreads, your SWF version will be forced to 18. /Users/tsubasa/Projects/Crossbridge/sdk/usr/bin/ld: error: cannot find -lopenh264 ./ffmpeg_mp4_openh264_aac/lib//libavcodec.a: error: undefined reference to '_WelsDestroySVCEncoder' ./ffmpeg_mp4_openh264_aac/lib//libavcodec.a: error: undefined reference to '_WelsGetCodecVersion' ./ffmpeg_mp4_openh264_aac/lib//libavcodec.a: error: undefined reference to '_WelsCreateSVCEncoder' collect2: ld returned 1 exit status Makefile:115: recipe for target 'link_openh264_release' failed make[1]: *** [link_openh264_release] Error 1 make[1]: Leaving directory '/Volumes/C/Users/Administrator/Documents/Project/FlashyWrappers/FlasCC' Makefile:18: recipe for target 'openh264_release' failed make: *** [openh264_release] Error 2

rainbowcreatures commented 7 years ago

This explains it:

error: cannot find -lopenh264

I don't remember the details, but you must install libopenh264 (as part of ffmpeg I believe, similar to how they've got x264). If you'll be still interested in this I can take a look at more details when I'm near my old laptop.

rainbowcreatures commented 6 years ago

Closing the issue, no activity.