gentoo LLVM linking problem
If you look at the build log it says
error: undefined reference to 'llvm::Module::~Module()'
You probably don't have the static llvm libs or something. Perhaps try installing the llvm or llvm-common packages if you haven't already.
Alternatively, you could just download the latest AppImage from https://rpcs3.net/download
@hcorion
Perhaps try installing the llvm or llvm-common packages if you haven't already
Installed already.
Hmm, from what I can tell Gentoo's LLVM doesn't provide static libs, apparently because
"static libraries are security flaw and waste of time."
-- http://lists.llvm.org/pipermail/llvm-dev/2015-September/090589.html
However, we need to link statically against llvm because of conflicts with the mesa driver.
I guess you could build llvm using the submodule.
# Assuming in rpcs3 source directory
cd llvm ; mkdir build ; cd build ; cmake ../ -DCMAKE_BUILD_TYPE=Release ; make
and then when building rpcs3, run cmake with
cmake -DLLVM_DIR=/path_to_rpcs3_source/llvm/build/lib/cmake/llvm
why you don't add shared option for custom build and static will remain as default choice for distributed appimage
@hcorion how about shared option?
I reverted this commit https://github.com/RPCS3/rpcs3/pull/3085/commits/e2cef655df4559ef24c6ad1935c038ad040cab23 but nothing changed, same error.
Switched linker to bfd from gold and now i see this /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/../../../../x86_64-pc-linux-gnu/bin/ld.bfd: cannot find -lLLVM
@soredake Can you try with #3404 ?
You'll need to build with cmake -DUSE_SHARED_LLVM_LIBS=ON
Should be fixed as of #3404 , provided you build with shared libs, Note that building with shared libs may make RPCS3 not work at all if it conflicts with mesa
Tried again, still
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/../../../../x86_64-pc-linux-gnu/bin/ld.bfd: cannot find -lLLVM
Probably has to do with weird Gentoo packaging. Try with
cmake -DUSE_SHARED_LLVM_LIBS=ON -DLLVM_DIR=/usr/lib/llvm/4/lib/cmake/llvm/
I already tried with this path as LLVM_DIR, still the same error, sadly.
I think problem related to gcc-6.4 can you try with gcc-5 or clang
Gcc-5 = fail Gcc-7 = fail clang-4 = fail clang-5 = fail Fails with llvm-5 and https://github.com/RPCS3/rpcs3/pull/3410 too
Oh. Because of course Gentoo has to do something different from literally every other distro. https://wiki.gentoo.org/wiki/Project:LLVM/Shared_libraries
So, no support for gentoo will be provided ever?
Not at all, this is an open source project, if you or someone else can figure out how to get it to build on Gentoo, then please create a Pull Request for it.
Perhaps I'll setup a Gentoo VM one of these days and figure it out.
Of course, you could just download and use the AppImage: https://rpcs3.net/download
Gentoo VM
Better to use docker
docker create -v /usr/portage --name portage gentoo/portage
docker run -it --rm \
--volumes-from portage \
--entrypoint "bash" \
gentoo/stage3-amd64:latest