justdan96 / tsMuxer

tsMuxer is a transport stream muxer for remuxing/muxing elementary streams, EVO/VOB/MPG, MKV/MKA, MP4/MOV, TS, M2TS to TS to M2TS. Supported video codecs H.264/AVC, H.265/HEVC, VC-1, MPEG2. Supported audio codecs AAC, AC3 / E-AC3(DD+), DTS/ DTS-HD.
Apache License 2.0
853 stars 144 forks source link

latest git fails to build with clang 14/termux/arm? #599

Closed Randrianasulu closed 2 years ago

Randrianasulu commented 2 years ago

attempt at compiling yelds this:

42%] Building CXX object CMakeFiles/tsmuxer.dir/main.cpp.o
/data/data/com.termux/files/home/tsMuxer/tsMuxer/iso_writer.cpp:1406:38: error: expected '}'
    return IsoHeaderData{"*tsMuxeR " TSMUXER_VERSION, std::string("*tsMuxeR ") + int32ToHex(random32()), time(0),
                                     ^
/data/data/com.termux/files/home/tsMuxer/tsMuxer/iso_writer.cpp:1406:25: note: to match this '{'
    return IsoHeaderData{"*tsMuxeR " TSMUXER_VERSION, std::string("*tsMuxeR ") + int32ToHex(random32()), time(0),
                        ^
1 error generated.
make[2]: *** [CMakeFiles/tsmuxer.dir/build.make:370: CMakeFiles/tsmuxer.dir/iso_writer.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/data/data/com.termux/files/home/tsMuxer/tsMuxer/main.cpp:582:43: error: expected ';' after expression
    LTRACE(LT_INFO, 2, "tsMuxeR version " TSMUXER_VERSION << ". github.com/justdan96/tsMuxer");
                                          ^
/data/data/com.termux/files/home/tsMuxer/tsMuxer/main.cpp:582:43: error: use of undeclared identifier 'TSMUXER_VERSION'
/data/data/com.termux/files/home/tsMuxer/tsMuxer/main.cpp:582:5: error: expected expression
    LTRACE(LT_INFO, 2, "tsMuxeR version " TSMUXER_VERSION << ". github.com/justdan96/tsMuxer");
    ^
/data/data/com.termux/files/home/tsMuxer/tsMuxer/vod_common.h:22:17: note: expanded from macro 'LTRACE'
                else if (level == LT_INFO)         \
                ^
3 errors generated.
make[2]: *** [CMakeFiles/tsmuxer.dir/build.make:398: CMakeFiles/tsmuxer.dir/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/tsmuxer.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
$
justdan96 commented 2 years ago

It looks like Cmake isn't setting the TSMUXER_VERSION variable. Perhaps you can check the Cmake output?

Randrianasulu commented 2 years ago

@justdan96 oh yes, i created build directory in tsMuxer/tsMuxer, so configure part worked yet build failed.

Is there way to guard against this?

lighterowl commented 2 years ago

You shouldn't be starting builds from tsMuxer/tsMuxer in the first place. It's not a self-contained project and, even if TSMUXER_VERSION were defined, the build would fail later on due to missing libmediation.

The only way to do a build is to run cmake from the top directory. There's no point in guarding against this.