dslm4515 / CMLFS

Clang-Built Musl Linux From Scratch
MIT License
99 stars 18 forks source link

llvmtools: Failed to build Cmake under Glibc #19

Closed owl4ce closed 3 years ago

owl4ce commented 3 years ago
...

[ 28%] Building C object Source/kwsys/CMakeFiles/cmsysTestSharedForward.dir/testSharedForward.c.o
[ 28%] Building C object Source/kwsys/CMakeFiles/cmsysTestsC.dir/testEncode.c.o
[ 28%] Building C object Source/kwsys/CMakeFiles/cmsysTestsC.dir/cmsysTestsC.c.o
[ 29%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_acl.c.o
[ 29%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_check_magic.c.o
In file included from /mnt/cmlfs/sources/pkgs/cmake-3.20.5/Utilities/cmlibarchive/libarchive/archive_acl.c:37:
/usr/include/wchar.h:600:9: error: unknown type name '__gnuc_va_list'
                      __gnuc_va_list __arg)
                      ^
/usr/include/wchar.h:607:8: error: unknown type name '__gnuc_va_list'
                     __gnuc_va_list __arg)
                     ^
/usr/include/wchar.h:613:9: error: unknown type name '__gnuc_va_list'
                      __gnuc_va_list __arg)
                      ^
/usr/include/wchar.h:675:8: error: unknown type name '__gnuc_va_list'
                     __gnuc_va_list __arg)
                     ^
/usr/include/wchar.h:682:7: error: unknown type name '__gnuc_va_list'
                    __gnuc_va_list __arg)
                    ^
/usr/include/wchar.h:687:8: error: unknown type name '__gnuc_va_list'
                     __gnuc_va_list __arg)
                     ^
/usr/include/wchar.h:698:7: error: unknown type name '__gnuc_va_list'
                                  __gnuc_va_list __arg), __isoc99_vfwscanf)
                                  ^
/usr/include/wchar.h:701:6: error: unknown type name '__gnuc_va_list'
                                 __gnuc_va_list __arg), __isoc99_vwscanf)
                                 ^
/usr/include/wchar.h:705:11: error: unknown type name '__gnuc_va_list'
                                      __gnuc_va_list __arg), __isoc99_vswscanf)
                                      ^

... so many errors here ...

I don't know how to override headers PATH to /llvmtools/include, when I try to configure with CFLAGS="-I/llvmtools/include" CXXFLAGS="-I/llvmtools/include" ./bootstrap still fails to build.

dslm4515 commented 3 years ago

Strange. I had no issues with CMake for llvmtools... I even forgot to install it, so I had to open another tmux session, build and install it to llvmtools

dslm4515 commented 3 years ago

A quick fix would be to build Cmake under chroot.

I may try another build on a Gentoo host :P

owl4ce commented 3 years ago

A quick fix would be to build Cmake under chroot.

I may try another build on a Gentoo host :P

I know, but building libuv need autoconf, automake, and libtool.

dslm4515 commented 3 years ago

I know, but building libuv need autoconf, automake, and libtool.

llvmtools should have libuv to build cmake for llvmtools

owl4ce commented 3 years ago

I mean in chroot

I know, but building libuv need autoconf, automake, and libtool.

llvmtools should have libuv to build cmake for llvmtools

dslm4515 commented 3 years ago

In chroot, llvmtools should have libuv. Just change the prefix to /llvmtools ... although, I'm not sure if the bootstrap script will need autotools (autoconf, automake, etc)

Does CMake bootstrap if you try to build CMake for your host? ./bootstrap --prefix=/usr

owl4ce commented 3 years ago

In chroot, llvmtools should have libuv. Just change the prefix to /llvmtools ... although, I'm not sure if the bootstrap script will need autotools (autoconf, automake, etc)

Does CMake bootstrap if you try to build CMake for your host? ./bootstrap --prefix=/usr

Yes, cmake bootstrap successful in host but not when building it.

owl4ce commented 3 years ago

Ok, I'll try cmake in chroot with libuv in llvmtools later. Currently very tired.

owl4ce commented 3 years ago

Ah I see, this was my mistake that including zlib header (preferred to use because installed (needed by pigz)) in llvmtools. Should be normal if not using systems installed programs.