Skip to content

Compilation Failure on Arch Linux & distcc #145

@bronze51

Description

@bronze51

I just started using distcc and successfully compiled "hello world", so I thought I move on to bigger things. The build for "vc4c-git" fails and I think it is due to phtread:

Using distcc to compile VC4C. The server is:

uname -a
Linux heimdallr 5.4.42-1-ARCH #1 SMP PREEMPT Tue May 26 01:48:52 UTC 2020 armv7l GNU/Linux

The host is:

uname -a
Linux walhalla 5.6.15-arch1-1 #1 SMP PREEMPT Wed, 27 May 2020 23:42:26 +0000 x86_64 GNU/Linux

Contents of "~/.cache/yay/vc4c-git/src/VC4C-master/build/CMakeFiles/CMakeError.log"

Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: ~/.cache/yay/vc4c-git/src/VC4C-master/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_fcdf3/fast && /usr/bin/make  -f CMakeFiles/cmTC_fcdf3.dir/build.make CMakeFiles/
cmTC_fcdf3.dir/build
make[1]: Entering directory '~/.cache/yay/vc4c-git/src/VC4C-master/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_fcdf3.dir/src.c.o
/usr/lib/distcc/bin/cc   -D_FORTIFY_SOURCE=2 -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector
-strong -fno-plt -DCMAKE_HAVE_LIBC_PTHREAD   -o CMakeFiles/cmTC_fcdf3.dir/src.c.o   -c ~/.cache/yay/vc4c-gi
t/src/VC4C-master/build/CMakeFiles/CMakeTmp/src.c
Linking C executable cmTC_fcdf3
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_fcdf3.dir/link.txt --verbose=1
/usr/lib/distcc/bin/cc -D_FORTIFY_SOURCE=2 -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector-s
trong -fno-plt -DCMAKE_HAVE_LIBC_PTHREAD  -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now  -rdynamic CMakeFiles/cmTC_f
cdf3.dir/src.c.o  -o cmTC_fcdf3
/usr/bin/ld: CMakeFiles/cmTC_fcdf3.dir/src.c.o: in function `main':
src.c:(.text.startup+0x38): undefined reference to `pthread_create'
/usr/bin/ld: src.c:(.text.startup+0x40): undefined reference to `pthread_detach'
/usr/bin/ld: src.c:(.text.startup+0x48): undefined reference to `pthread_cancel'
/usr/bin/ld: src.c:(.text.startup+0x54): undefined reference to `pthread_join'
collect2: error: ld returned 1 exit status

Complaints of "yay -S vc4c-git"

-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/lib/distcc/bin/cc
-- Check for working C compiler: /usr/lib/distcc/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/lib/distcc/bin/c++
-- Check for working CXX compiler: /usr/lib/distcc/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- build deb package...
-- Configuring done
-- Generating done
-- Build files have been written to: ~/.cache/yay/vc4c-git/src/VC4CLStdLib-master/build

...

make[1]: *** [CMakeFiles/Makefile2:1957: src/CMakeFiles/VC4CC.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[100%] Linking CXX shared library libcpptest-lite.so
[100%] Built target cpptest-lite
[ 42%] Built target cpptest-lite-project-build
make: *** [Makefile:183: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
Error making: vc4c-git

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions