Closed Selur closed 2 years ago
@Selur I am no compiler specialist, however if c++11 is the standard in GNU 7.5.0, you might have to force the use of c++17.
From this SO: https://askubuntu.com/questions/1256440/how-to-get-libstdc-with-c17-filesystem-headers-on-ubuntu-18-bionic
It looks like there is a solution for Ubuntu 18:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install gcc-9 g++-9
Nice, will try to test on the weekend.
Short of calling in https://github.com/gulrak/filesystem as a git submodule. That's what we do for AviSynth+ on OSes that use GCC 7* (GCC 8 merely requires linking in libstdc++fs; GCC 9 mainlined it into the normal libstdc++).
older Ubuntu LTSes, as above, or Tigerbrew on PPC Macs. I think one of the BSDs also still ships with GCC 7 as its default compiler as well, or that it may use a newer GCC but disabled the filesystem support? I can't remember exactly.
Okay, installing gcc-9 and g++9 did not really help,...
Now I got:
gcc gcc-9 gcc-ar-7 gcc-nm gcc-nm-9 gcc-ranlib-7
gcc-7 gcc-ar gcc-ar-9 gcc-nm-7 gcc-ranlib gcc-ranlib-9
and
g++ g++-7 g++-9
on my system, but calling './rebuild_linux.sh' still fails with the same error sind the default gcc is gcc-7 and not 9.
Adding export CXX=gcc-9
helped with that.
Now it fails with:
[60/60] Linking CXX executable tsMuxer/tsmuxer
FAILED: tsMuxer/tsmuxer
: && /usr/bin/gcc-9 -rdynamic tsMuxer/CMakeFiles/tsmuxer.dir/aac.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/aacStreamReader.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/AbstractDemuxer.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/abstractMuxer.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/ac3Codec.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/ac3StreamReader.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/avCodecs.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/bitStream.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/blurayHelper.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/bufferedFileReader.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/bufferedFileWriter.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/bufferedReader.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/bufferedReaderManager.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/combinedH264Demuxer.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/convertUTF.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/dtsStreamReader.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/dvbSubStreamReader.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/h264StreamReader.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/hevc.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/hevcStreamReader.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/ioContextDemuxer.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/iso_writer.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/lpcmStreamReader.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/main.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/matroskaDemuxer.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/matroskaParser.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/metaDemuxer.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/movDemuxer.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/mp3Codec.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/mpeg2StreamReader.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/mpegAudioStreamReader.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/mpegStreamReader.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/mpegVideo.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/muxerManager.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/nalUnits.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/pesPacket.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/programStreamDemuxer.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/psgStreamReader.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/simplePacketizerReader.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/singleFileMuxer.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/srtStreamReader.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/textSubtitles.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/textSubtitlesRender.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/tsDemuxer.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/tsMuxer.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/tsPacket.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/utf8Converter.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/vc1Parser.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/vc1StreamReader.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/vod_common.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/vvc.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/vvcStreamReader.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/wave.cpp.o tsMuxer/CMakeFiles/tsmuxer.dir/osdep/textSubtitlesRenderFT.cpp.o -o tsMuxer/tsmuxer libmediation/libmediation.a -lz -lfreetype -lfreetype -lpthread && :
/usr/bin/ld: tsMuxer/CMakeFiles/tsmuxer.dir/psgStreamReader.cpp.o: undefined reference to symbol 'floor@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
It appears -lm
needs to be added to the link line. For now can you test by running CMake, looking for the link.txt file, adding -lm
to the end and then running Make?
I called export CXX=gcc-9 ran cmake modifying ./tsMuxer/CMakeFiles/tsmuxer.dir/link.txt then calling make and got tons of missing references: buildfail.txt
There are so many missing dependencies it makes me think there is an issue with the toolchain. I might have to try this out in a Ubuntu 18.04 Docker container.
might be. as a side note: works fine on Ubuntu 20.04 and I will also look at it in a new 18.04 VM over the weekend (busy week)
Clang-10 should be available in Ubuntu 18 and should work, I might get some time at the weekend to have a look, otherwise it will be next week.
Hi @Selur , have you sorted out the issue ?
Nope, still stuck where I stopped on 27th of October.
I am going to (hopefully) be pushing a large update to the Docker container we use to generate the nightly builds. In this update we will be using Ubuntu 18.04 with cmake 3.14.5 and Apple Clang 12 so if all our builds work in that container we should be able to also use the same steps on your Ubuntu 18.04 machine.
Edit: I just noticed in that repository they are using GCC 11, can you confirm if you are still seeing the issue? https://github.com/Selur/hybrid-vapoursynth-addon/commit/2bed72ea53e5199bd480d6a1dd6a0ca16460b743
Edit: Fixed by #588
I'm on Ubuntu 18.04 trying to build tsMuxeR
(happens while using https://github.com/Selur/hybrid-vapoursynth-addon -> build-tools.sh)
Am I missing some dependency?
Cu Selur