Closed takusuman closed 1 year ago
TBH, I still don't understand why in your builds invokes host's libraries rather than /cgnutools
. :thinking:
TBH, I still don't understand why in your builds invokes host's libraries rather than
/cgnutools
. thinking
I quickly remembered /etc/ld.so.conf, but i didn't touched it since i installed Arch.
Geez, what am i doing wrong? May if i change my host it will compile?
I quickly remembered /etc/ld.so.conf, but i didn't touched it since i installed Arch.
No, since we have adjust the GCC specs. ${COPA_TARGET}-gcc
invokes ld-musl-x86_64.so.1
, and it's invokes the library paths in the ld-musl-x86_64.path
sequentially.
Geez, what am i doing wrong? May if i change my host it will compile?
Can you set -DCMAKE_PREFIX_PATH
to /cgnutools
? Looks like it fixes this issue 🤔
Ref: https://cmake.org/cmake/help/v3.0/variable/CMAKE_PREFIX_PATH.html
I quickly remembered /etc/ld.so.conf, but i didn't touched it since i installed Arch.
No, since we have adjust the GCC specs.
${COPA_TARGET}-gcc
invokesld-musl-x86_64.so.1
, and it's invokes the library paths in theld-musl-x86_64.path
sequentially.
Yeah, i know; in fact i just checked it to cleanse my conscience.
Geez, what am i doing wrong? May if i change my host it will compile?
Can you set
-DCMAKE_PREFIX_PATH
to/cgnutools
? Looks like it fixes this issue thinking Ref: https://cmake.org/cmake/help/v3.0/variable/CMAKE_PREFIX_PATH.html
Sure! I'll try this.
Same error at 4%... Damn.
If i get any progress here, i'll post here.
Do you think it has anything to do with ICONV_LIBRARY_PATH
?
When I run cmake to configure, it prints this warning:
CMake Warning:
Manually-specified variables were not used by the project:
ICONV_LIBRARY_PATH
Do you think it has anything to do with
ICONV_LIBRARY_PATH
?
For me, nothing happens. Ask @dslm4515.
Related issue: https://reviews.llvm.org/D38875
I successfully built cgnutools and llvmtools with that warning shown.
I know a fix for this:
Remember this part
cat > /cgnutools/etc/ld-musl-$(uname -m).path << "EOF"
/cgnutools/lib
/cgnutools/${CMLFS_TARGET}/lib
/usr/lib64
/lib64
/usr/lib
/lib
EOF
After compiling gcc-11.2.0 (5-GCC-final), I discovered that it actually installs the libraries in /cgnutools/x86_64-cmlfs-linux-musl/lib
instead of /cgnutools/lib
I simply copied over everything in /cgnutools/x86_64-cmlfs-linux-musl/lib
into /cgnutools/lib
, and I managed to compile more than what I was able to (I didn't finish it yet)
You can probably fix this by changing /cgnutools/${CMLFS_TARGET}/lib
into /cgnutools/x86_64-cmlfs-linux-musl/lib
in /cgnutools/etc/ld-musl-x86_64.path
.
I simply copied over everything in
/cgnutools/x86_64-cmlfs-linux-musl/lib
into/cgnutools/lib
, and I managed to compile more than what I was able to (I didn't finish it yet)
Probably better to create symlinks for them if not conflicts.
You can fix this by running:
sed -i "s/\${CMLFS_TARGET}/x86_64-cmlfs-linux-musl/g" /cgnutools/etc/ld-musl-x86_64.path
I upgraded cgnutools with LLVM-15.0.5 via commit 71676d1336ff57f4c0982c8a28cdf77267c58bd0
I used a new approach for building LLVM+Clang for cgnutools... used the monorepo llvm-project-x.x.x.src.tar.xz
not llvm-x.x.x.src.tar.xz
. Using the old method used llvm-x.x.x.src.tar.xz
which caused too many configure & compile errors. For example, there were missing CMake modules that are now not in that source tarball anymore. Has to be downloaded and unpacked.
Built on a glibc host. I got a 6-core, 12-thread CPU, so now the LLVM builds are SO FAST, that I can experiment faster. My previous system had a 2-core, 4-thread CPU. Builds on it took hours. New system? Longest build time was ... 20mins!
This is the command line i used to configure cmake. In fact, it's the same from the documentation.
My .bashrc: