Closed Tatsh closed 1 year ago
Let me see what's up with that
I returned "-fexperimental-library" compiler flag as this is most likely the culprit. This is a temporary solution as I will not be supporting older compilers as it requires a lot of maintenance.
Let me know if it compiles for you now.
Unfortunately, no. Think something else also needs to be brought back?
ninja -v -j1 -l0
[1/122] "/usr/lib/llvm/16/bin/clang-scan-deps" -format=p1689 -- /usr/lib/llvm/16/bin/clang++-16 -DREDUMPER_VERSION_BUILD=LOCAL -DREDUMPER_VERSION_MAJOR=2023 -DREDUMPER_VERSION_MINOR=06 -DREDUMPER_VERSION_PATCH=13 -ggdb -march=native -mtune=native -pipe -ftree-vectorize -Wno-unknown-warning-option -std=c++20 -stdlib=libc++ -fexperimental-library -Wno-read-modules-implicitly -x c++ /var/tmp/portage/app-cdr/redumper-168/work/redumper-build_168/generate_offsets.cc -c -o CMakeFiles/generate_offsets.dir/generate_offsets.cc.o -MT CMakeFiles/generate_offsets.dir/generate_offsets.cc.o.ddi -MD -MF CMakeFiles/generate_offsets.dir/generate_offsets.cc.o.ddi.d > CMakeFiles/generate_offsets.dir/generate_offsets.cc.o.ddi
[2/122] /usr/bin/cmake -E cmake_ninja_dyndep --tdi=CMakeFiles/generate_offsets.dir/CXXDependInfo.json --lang=CXX --modmapfmt=clang --dd=CMakeFiles/generate_offsets.dir/CXX.dd @CMakeFiles/generate_offsets.dir/CXX.dd.rsp
[3/122] /usr/lib/llvm/16/bin/clang++-16 -DREDUMPER_VERSION_BUILD=LOCAL -DREDUMPER_VERSION_MAJOR=2023 -DREDUMPER_VERSION_MINOR=06 -DREDUMPER_VERSION_PATCH=13 -ggdb -march=native -mtune=native -pipe -ftree-vectorize -Wno-unknown-warning-option -std=c++20 -stdlib=libc++ -fexperimental-library -Wno-read-modules-implicitly -MD -MT CMakeFiles/generate_offsets.dir/generate_offsets.cc.o -MF CMakeFiles/generate_offsets.dir/generate_offsets.cc.o.d @CMakeFiles/generate_offsets.dir/generate_offsets.cc.o.modmap -o CMakeFiles/generate_offsets.dir/generate_offsets.cc.o -c /var/tmp/portage/app-cdr/redumper-168/work/redumper-build_168/generate_offsets.cc
[4/122] : && /usr/lib/llvm/16/bin/clang++-16 -ggdb -march=native -mtune=native -pipe -ftree-vectorize -Wno-unknown-warning-option -Wl,-O1 -Wl,--as-needed -stdlib=libc++ -static -fexperimental-library CMakeFiles/generate_offsets.dir/generate_offsets.cc.o -o generate_offsets && :
FAILED: generate_offsets
: && /usr/lib/llvm/16/bin/clang++-16 -ggdb -march=native -mtune=native -pipe -ftree-vectorize -Wno-unknown-warning-option -Wl,-O1 -Wl,--as-needed -stdlib=libc++ -static -fexperimental-library CMakeFiles/generate_offsets.dir/generate_offsets.cc.o -o generate_offsets && :
/usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lc++: No such file or directory
clang-16: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
I definitely have libc++ installed as I always have for this app since the change to modules:
$ ls -la /usr/lib*/libc++* | sort -k7
-rwxr-xr-x 1 root root 259K 2023-06-04 04:59 /usr/lib64/libc++abi.so.1.0
lrwxrwxrwx 1 root root 16 2023-06-04 04:59 /usr/lib64/libc++abi.so.1 -> libc++abi.so.1.0
lrwxrwxrwx 1 root root 14 2023-06-04 04:59 /usr/lib64/libc++abi.so -> libc++abi.so.1
-rwxr-xr-x 1 root root 246K 2023-06-04 04:59 /usr/lib/libc++abi.so.1.0
lrwxrwxrwx 1 root root 16 2023-06-04 04:59 /usr/lib/libc++abi.so.1 -> libc++abi.so.1.0
lrwxrwxrwx 1 root root 14 2023-06-04 04:59 /usr/lib/libc++abi.so -> libc++abi.so.1
-rw-r--r-- 1 root root 143K 2023-06-04 05:03 /usr/lib64/libc++experimental.a
lrwxrwxrwx 1 root root 11 2023-06-04 05:03 /usr/lib64/libc++_shared.so -> libc++.so.1
-rwxr-xr-x 1 root root 123 2023-06-04 05:03 /usr/lib64/libc++.so
-rwxr-xr-x 1 root root 986K 2023-06-04 05:03 /usr/lib64/libc++.so.1.0
lrwxrwxrwx 1 root root 13 2023-06-04 05:03 /usr/lib64/libc++.so.1 -> libc++.so.1.0
-rw-r--r-- 1 root root 112K 2023-06-04 05:03 /usr/lib/libc++experimental.a
lrwxrwxrwx 1 root root 11 2023-06-04 05:03 /usr/lib/libc++_shared.so -> libc++.so.1
-rwxr-xr-x 1 root root 121 2023-06-04 05:03 /usr/lib/libc++.so
-rwxr-xr-x 1 root root 1.1M 2023-06-04 05:03 /usr/lib/libc++.so.1.0
lrwxrwxrwx 1 root root 13 2023-06-04 05:03 /usr/lib/libc++.so.1 -> libc++.so.1.0
I'm on Gentoo and we have Clang 16 and GCC 13. As soon as 17/14 are out they will be available to me and every other Gentoo user and fixes like these won't be necessary. Thanks for supporting the older compilers for the time being.
There has to be a static library libc++.a. Another change that I made recently was -static linking flag that makes redumper executable self contained. Make sure you either have libc++.a or, alternatively, you can strip "-static" from: https://github.com/superg/redumper/blob/main/CMakeLists.txt#L61
Since it's easy I am going to just add the flag -fexperimental-library
so you can remove it here.
Adding static libs fixes my issue. Thanks.
Latest version I can build is 161. 166 gives an error regarding format not being in the std namespace: