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

error in building code of untrunc #63

Closed
roopa01 opened this issue Aug 25, 2016 · 4 comments
Closed

error in building code of untrunc #63

roopa01 opened this issue Aug 25, 2016 · 4 comments

Comments

@roopa01
Copy link

roopa01 commented Aug 25, 2016

Hi,

I build this code on mavericks (mac OS) it is giving error endian.h file not found while it exist in usr/include/machine and it is also giving error on #include "libavcodec/avcodec.h" while i have successfully configured ffmpeg on this OS and all .h file and .a file exist at required path.

Kindly help me to remove these error.

Regards,
roopa01

@roopa01 roopa01 changed the title endian.h not found error in building code of untrunc Sep 1, 2016
@martymulligan
Copy link

I can get a little further by including -I /usr/include/machine but then it errors out with

/usr/include/_types/_wctype_t.h:31:9: error: unknown type name '__darwin_wctype_t'

$ g++ -o untrunc file.cpp main.cpp track.cpp atom.cpp mp4.cpp -L/usr/local/lib -lavformat -lavcodec -lavutil -I /usr/include/machine In file included from file.cpp:21: In file included from ./file.h:28: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/vector:265: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__bit_reference:15: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:628: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:604: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iterator:346: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:90: In file included from /usr/include/wchar.h:92: In file included from /usr/include/_wctype.h:47: /usr/include/_types/_wctype_t.h:31:9: error: unknown type name '__darwin_wctype_t' typedef __darwin_wctype_t wctype_t; ^ In file included from file.cpp:21: In file included from ./file.h:29: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:438: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cwchar:107: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cwctype:55: In file included from /usr/include/wctype.h:36: /usr/include/_types/_wctrans_t.h:31:9: error: unknown type name '__darwin_wctrans_t' typedef __darwin_wctrans_t wctrans_t; ^ In file included from file.cpp:21: In file included from ./file.h:29: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:708:26: error: use of undeclared identifier '__DARWIN_WEOF' {return int_type(WEOF);} ^ /usr/include/_wctype.h:50:16: note: expanded from macro 'WEOF' #define WEOF __DARWIN_WEOF ^ file.cpp:70:12: error: use of undeclared identifier 'be32toh' return be32toh(value); ^ file.cpp:79:12: error: use of undeclared identifier 'be64toh' return be64toh(value); ^ file.cpp:97:9: error: use of undeclared identifier 'htobe32' n = htobe32(n); ^ file.cpp:103:9: error: use of undeclared identifier 'htobe64' n = htobe64(n); ^ 7 errors generated. In file included from main.cpp:21: In file included from ./mp4.h:24: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/vector:265: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__bit_reference:15: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:628: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:604: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iterator:346: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:90: In file included from /usr/include/wchar.h:92: In file included from /usr/include/_wctype.h:47: /usr/include/_types/_wctype_t.h:31:9: error: unknown type name '__darwin_wctype_t' typedef __darwin_wctype_t wctype_t; ^ In file included from main.cpp:21: In file included from ./mp4.h:25: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:438: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cwchar:107: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cwctype:55: In file included from /usr/include/wctype.h:36: /usr/include/_types/_wctrans_t.h:31:9: error: unknown type name '__darwin_wctrans_t' typedef __darwin_wctrans_t wctrans_t; ^ In file included from main.cpp:21: In file included from ./mp4.h:25: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:708:26: error: use of undeclared identifier '__DARWIN_WEOF' {return int_type(WEOF);} ^ /usr/include/_wctype.h:50:16: note: expanded from macro 'WEOF' #define WEOF __DARWIN_WEOF ^ In file included from main.cpp:24: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iostream:38: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ios:216: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__locale:39: In file included from /usr/include/xlocale.h:104: /usr/include/xlocale/_time.h:30:29: error: expected ';' after top level declarator __DARWIN_ALIAS(strftime_l) __strftimelike(3); ^ /usr/include/xlocale/_time.h:33:29: error: expected ';' after top level declarator __DARWIN_ALIAS(strptime_l) __strftimelike(2); ^ In file included from main.cpp:24: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iostream:40: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/istream:163: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:140: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/locale:202: In file included from /usr/include/nl_types.h:94: /usr/include/_types/_nl_item.h:31:9: error: unknown type name '__darwin_nl_item' typedef __darwin_nl_item nl_item; ^ 6 errors generated. In file included from track.cpp:21: In file included from ./track.h:24: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/vector:265: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__bit_reference:15: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:628: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:604: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iterator:346: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:90: In file included from /usr/include/wchar.h:92: In file included from /usr/include/_wctype.h:47: /usr/include/_types/_wctype_t.h:31:9: error: unknown type name '__darwin_wctype_t' typedef __darwin_wctype_t wctype_t; ^ In file included from track.cpp:21: In file included from ./track.h:25: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:438: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cwchar:107: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cwctype:55: In file included from /usr/include/wctype.h:36: /usr/include/_types/_wctrans_t.h:31:9: error: unknown type name '__darwin_wctrans_t' typedef __darwin_wctrans_t wctrans_t; ^ In file included from track.cpp:21: In file included from ./track.h:25: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:708:26: error: use of undeclared identifier '__DARWIN_WEOF' {return int_type(WEOF);} ^ /usr/include/_wctype.h:50:16: note: expanded from macro 'WEOF' #define WEOF __DARWIN_WEOF ^ In file included from track.cpp:24: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iostream:38: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ios:216: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__locale:39: In file included from /usr/include/xlocale.h:104: /usr/include/xlocale/_time.h:30:29: error: expected ';' after top level declarator __DARWIN_ALIAS(strftime_l) __strftimelike(3); ^ /usr/include/xlocale/_time.h:33:29: error: expected ';' after top level declarator __DARWIN_ALIAS(strptime_l) __strftimelike(2); ^ In file included from track.cpp:24: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iostream:40: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/istream:163: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:140: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/locale:202: In file included from /usr/include/nl_types.h:94: /usr/include/_types/_nl_item.h:31:9: error: unknown type name '__darwin_nl_item' typedef __darwin_nl_item nl_item; ^ track.cpp:81:10: error: use of undeclared identifier 'be32toh' int s = be32toh(*(int *)start); ^ track.cpp:173:11: error: use of undeclared identifier 'be32toh' int t = be32toh(*(int *)(start + 4)); ^ track.cpp:204:20: error: use of undeclared identifier 'avcodec_alloc_frame' AVFrame *frame = avcodec_alloc_frame(); ^ track.cpp:213:18: warning: 'avcodec_decode_audio4' is deprecated [-Wdeprecated-declarations] int consumed = avcodec_decode_audio4(context, frame, &got_frame, &avp); ^ /usr/local/include/libavcodec/avcodec.h:4704:5: note: 'avcodec_decode_audio4' has been explicitly marked deprecated here int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame, ^ track.cpp:265:16: error: use of undeclared identifier 'be32toh' int length = be32toh(*(int *)start); ^ track.cpp:285:12: error: use of undeclared identifier 'be32toh' int l = be32toh(*(int *)pos); ^ track.cpp:309:10: error: use of undeclared identifier 'be32toh' return be32toh(*(int *)start); ^ track.cpp:391:59: warning: 'codec_name' is deprecated [-Wdeprecated-declarations] throw string("Could not open codec: ") + codec.context->codec_name; ^ /usr/local/include/libavcodec/avcodec.h:1664:22: note: 'codec_name' has been explicitly marked deprecated here char codec_name[32]; ^ 2 warnings and 12 errors generated. In file included from atom.cpp:2: In file included from ./atom.h:6: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/vector:265: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__bit_reference:15: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:628: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:604: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iterator:346: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:90: In file included from /usr/include/wchar.h:92: In file included from /usr/include/_wctype.h:47: /usr/include/_types/_wctype_t.h:31:9: error: unknown type name '__darwin_wctype_t' typedef __darwin_wctype_t wctype_t; ^ In file included from atom.cpp:2: In file included from ./atom.h:7: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:438: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cwchar:107: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cwctype:55: In file included from /usr/include/wctype.h:36: /usr/include/_types/_wctrans_t.h:31:9: error: unknown type name '__darwin_wctrans_t' typedef __darwin_wctrans_t wctrans_t; ^ In file included from atom.cpp:2: In file included from ./atom.h:7: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:708:26: error: use of undeclared identifier '__DARWIN_WEOF' {return int_type(WEOF);} ^ /usr/include/_wctype.h:50:16: note: expanded from macro 'WEOF' #define WEOF __DARWIN_WEOF ^ In file included from atom.cpp:7: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iostream:38: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ios:216: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__locale:39: In file included from /usr/include/xlocale.h:104: /usr/include/xlocale/_time.h:30:29: error: expected ';' after top level declarator __DARWIN_ALIAS(strftime_l) __strftimelike(3); ^ /usr/include/xlocale/_time.h:33:29: error: expected ';' after top level declarator __DARWIN_ALIAS(strptime_l) __strftimelike(2); ^ In file included from atom.cpp:7: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iostream:40: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/istream:163: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:140: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/locale:202: In file included from /usr/include/nl_types.h:94: /usr/include/_types/_nl_item.h:31:9: error: unknown type name '__darwin_nl_item' typedef __darwin_nl_item nl_item; ^ atom.cpp:253:12: error: use of undeclared identifier 'be32toh' return be32toh(*(int *)&(content[offset])); ^ atom.cpp:258:34: error: use of undeclared identifier 'htobe32' *(int *)&(content[offset]) = htobe32(value); ^ 8 errors generated. In file included from mp4.cpp:22: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:435: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:90: In file included from /usr/include/wchar.h:92: In file included from /usr/include/_wctype.h:47: /usr/include/_types/_wctype_t.h:31:9: error: unknown type name '__darwin_wctype_t' typedef __darwin_wctype_t wctype_t; ^ In file included from mp4.cpp:22: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:438: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cwchar:107: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cwctype:55: In file included from /usr/include/wctype.h:36: /usr/include/_types/_wctrans_t.h:31:9: error: unknown type name '__darwin_wctrans_t' typedef __darwin_wctrans_t wctrans_t; ^ In file included from mp4.cpp:22: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:708:26: error: use of undeclared identifier '__DARWIN_WEOF' {return int_type(WEOF);} ^ /usr/include/_wctype.h:50:16: note: expanded from macro 'WEOF' #define WEOF __DARWIN_WEOF ^ In file included from mp4.cpp:23: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iostream:38: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ios:216: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__locale:39: In file included from /usr/include/xlocale.h:104: /usr/include/xlocale/_time.h:30:29: error: expected ';' after top level declarator __DARWIN_ALIAS(strftime_l) __strftimelike(3); ^ /usr/include/xlocale/_time.h:33:29: error: expected ';' after top level declarator __DARWIN_ALIAS(strptime_l) __strftimelike(2); ^ In file included from mp4.cpp:23: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iostream:40: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/istream:163: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:140: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/locale:202: In file included from /usr/include/nl_types.h:94: /usr/include/_types/_nl_item.h:31:9: error: unknown type name '__darwin_nl_item' typedef __darwin_nl_item nl_item; ^ mp4.cpp:278:46: warning: 'codec' is deprecated [-Wdeprecated-declarations] track.codec.context = context->streams[i]->codec; ^ /usr/local/include/libavformat/avformat.h:880:21: note: 'codec' has been explicitly marked deprecated here AVCodecContext *codec; ^ 1 warning and 6 errors generated.

@o1y
Copy link

o1y commented Sep 21, 2016

@roopa01 @martymulligan
Check PR #35

@arielnoname
Copy link

@martymulligan did you get to compile it? I'm in the same error. Thanks

@brandon-dacrib
Copy link
Collaborator

You guys should try the dockerized build which was recently merged into master

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

5 participants