Skip to contentSkip to conversation

New: error in compiling gnutls

Buildroot bugzilla at busybox.net 1 participant 8 messages Mar 6, 2018 – Mar 23, 2018

lore
Share & tools
lore
#0 lore raw

https://bugs.busybox.net/show_bug.cgi?id=10846

Bug ID: 10846
Summary: error in compiling gnutls
Product: buildroot
Version: 2018.02
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned at buildroot.uclibc.org
Reporter: tinotom at gmail.com
CC: buildroot at uclibc.org
Target Milestone: ---

Hi,

it seems there is a bug in some header file in gnutls 3.5.17 .
Platform: Ubuntu 17.10 up-to-date on x86_64
Target: orange-pi-zero + systemd

Please read below an excerpt of the output:

[...]
checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking how to run the C++ preprocessor... cpp
configure: error: in `/home/santo/buildroot-2018.02/output/build/gnutls-3.5.17':
configure: error: C++ preprocessor "cpp" fails sanity check
See `config.log' for more details
package/pkg-generic.mk:237: recipe for target '/home/santo/buildroot-2018.02/output/build/gnutls-3.5.17/.stamp_configured' failed
make[1]: *** [/home/santo/buildroot-2018.02/output/build/gnutls-3.5.17/.stamp_configured] Error 1
Makefile:79: recipe for target '_all' failed
make: *** [_all] Error 2
santo at lapin:~/buildroot-2018.02$
[...]

in the corresponding config.log:
[...]
ldroot-2018.02/output/host/arm-buildroot-linux-gnueabihf/bin --enable-shared --disable-libgomp
Thread model: posix
gcc version 6.4.0 (Buildroot 2018.02)
configure:5369: $? = 0
configure:5358:
/home/santo/buildroot-2018.02/output/host/bin/arm-buildroot-linux-gnueabihf-gcc -V >&5
arm-buildroot-linux-gnueabihf-gcc.br_real: error: unrecognized command line option '-V'
arm-buildroot-linux-gnueabihf-gcc.br_real: fatal error: no input files compilation terminated.
configure:5369: $? = 1
configure:5358:
/home/santo/buildroot-2018.02/output/host/bin/arm-buildroot-linux-gnueabihf-gcc -qversion >&5
[...]

Please let me know if teh above is not enough.
Thank you

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#1 lore raw

[Buildroot] [Bug 10846] error in compiling gnutls

https://bugs.busybox.net/show_bug.cgi?id=10846

--- Comment #1 from Peter Seiderer <[email protected]> --- The cited config.log fragment is unrelated to the shown error (1), please try:

    $ make clean
    $ make

And if the error shows up again please provide your .config/defconfig file (see
http://nightly.buildroot.org/manual.html#reporting-bugs) and/or the complete build/gnutls-3.5.17/config.log file...

(1) not all errors in config.log lead to an configure error, there are many/hundreds of tests in there...

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#5 lore raw

[Buildroot] [Bug 10846] error in compiling gnutls

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=10846

--- Comment #5 from tinotom at gmail.com ---
Hi Peter, thank you for looking into this.
I tried to install buildroot on another machine, but the error is the same.

Perhaps a better spot can be:

[...]
configure:49488: result: cpp
configure:49508: cpp -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64 -I/storage/santo/buildroot/buildroot-2018.02/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include
conftest.cpp
In file included from /storage/santo/buildroot/buildroot-2018.02/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/features.h:447:0,
from
/storage/santo/buildroot/buildroot-2018.02/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/bits/libc-header-start.h:33,
from
/storage/santo/buildroot/buildroot-2018.02/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/limits.h:26,

                 from conftest.cpp:683:
/storage/santo/buildroot/buildroot-2018.02/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/gnu/stubs.h:7:11:
fatal error: gnu/stubs-soft.h: No such file or directory
 # include <gnu/stubs-soft.h>
           ^~~~~~~~~~~~~~~~~~
compilation terminated.
configure:49508: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GnuTLS"
| #define PACKAGE_TARNAME "gnutls"
[...]

. Anyway I've attached the buildroot .config, the linux kernel .config and the config.log.

Thank you,

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#6 lore raw

[Buildroot] [Bug 10846] error in compiling gnutls

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=10846

--- Comment #6 from Peter Seiderer <[email protected]> --- Yes, this config.log location was the real failure reason.

The hints to the solution are:

- checking how to run the C++ preprocessor... cpp
- configure:49488: result: cpp

Your toolchain is missing C++ support (and the gnutls packages is missing the C++ dependency), the following buildroot config change fixed the failure for me:

    $ diff -u .config.old .config
@@ -299,7 +300,7 @@
 BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE=y
 BR2_GCC_VERSION="6.4.0"
 BR2_EXTRA_GCC_CONFIG_OPTIONS=""
-# BR2_TOOLCHAIN_BUILDROOT_CXX is not set
+BR2_TOOLCHAIN_BUILDROOT_CXX=y
 # BR2_TOOLCHAIN_BUILDROOT_FORTRAN is not set
 # BR2_GCC_ENABLE_LTO is not set
 # BR2_GCC_ENABLE_OPENMP is not set

Regards,
Peter

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#7 lore raw

[Buildroot] [Bug 10846] error in compiling gnutls

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=10846

tinotom at gmail.com changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #7 from tinotom at gmail.com ---
Hi Peter,

thank you very much, your solution works and I've been able to generate the image.
Thank you very much again for your time.
Best,

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.