Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [Bug 8901] New: gcc failes to build if fortran is enabled
@ 2016-05-02 18:53 bugzilla at busybox.net
  2016-05-02 19:13 ` [Buildroot] [Bug 8901] " bugzilla at busybox.net
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: bugzilla at busybox.net @ 2016-05-02 18:53 UTC (permalink / raw)
  To: buildroot

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

            Bug ID: 8901
           Summary: gcc failes to build if fortran is enabled
           Product: buildroot
           Version: unspecified
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Other
          Assignee: unassigned at buildroot.uclibc.org
          Reporter: thijsvermeir at gmail.com
                CC: buildroot at uclibc.org
  Target Milestone: ---

When BR2_TOOLCHAIN_BUILDROOT_FORTRAN is enabled, gcc failes to build with this
error:

---
In file included from ../../../libgfortran/generated/any_l4.c:26:0:
../../../libgfortran/libgfortran.h:60:29: fatal error: quadmath_weak.h: No such
file or directory
 #  include "quadmath_weak.h"
                             ^
compilation terminated.
---

A quick fix is to also enable BR2_TOOLCHAIN_BUILDROOT_WCHAR as this is enabling
libquadmath in `package/gcc/gcc.mk`.

This can be reproduces with a minimal qemu config:
---
BR2_x86_64=y
BR2_DL_DIR="$(TOPDIR)/../dl"
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_5=y
BR2_TOOLCHAIN_BUILDROOT_FORTRAN=y
BR2_TARGET_GENERIC_GETTY_PORT="tty1"
BR2_SYSTEM_DHCP="eth0"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.5"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/x86_64/linux-4.5.config"
BR2_TARGET_ROOTFS_EXT2=y
# BR2_TARGET_ROOTFS_TAR is not set
---

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [Bug 8901] gcc failes to build if fortran is enabled
  2016-05-02 18:53 [Buildroot] [Bug 8901] New: gcc failes to build if fortran is enabled bugzilla at busybox.net
@ 2016-05-02 19:13 ` bugzilla at busybox.net
  2016-05-02 20:46 ` bugzilla at busybox.net
  2016-09-12 15:07 ` bugzilla at busybox.net
  2 siblings, 0 replies; 4+ messages in thread
From: bugzilla at busybox.net @ 2016-05-02 19:13 UTC (permalink / raw)
  To: buildroot

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

--- Comment #1 from Samuel Martin <s.martin49@gmail.com> ---
(In reply to Thijs Vermeir from comment #0)

AFAICS, this defconfig will try to build a fortran, so libquadmath, without
wchar support, which is required by quadmath...

Care to test with these patches:
https://github.com/tSed/buildroot/commit/ae69ebb61cb14455b282c34b26da97e6d2d4a49d
https://github.com/tSed/buildroot/commit/82b0c580ce934c969839ce5e5029700d9bbdaff6

They are part of a longer series not posted yet.

Regards,

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [Bug 8901] gcc failes to build if fortran is enabled
  2016-05-02 18:53 [Buildroot] [Bug 8901] New: gcc failes to build if fortran is enabled bugzilla at busybox.net
  2016-05-02 19:13 ` [Buildroot] [Bug 8901] " bugzilla at busybox.net
@ 2016-05-02 20:46 ` bugzilla at busybox.net
  2016-09-12 15:07 ` bugzilla at busybox.net
  2 siblings, 0 replies; 4+ messages in thread
From: bugzilla at busybox.net @ 2016-05-02 20:46 UTC (permalink / raw)
  To: buildroot

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

--- Comment #2 from Thijs Vermeir <thijsvermeir@gmail.com> ---
This works for x86_64, but does not work for qemu_arm_versatile_defconfig.

---
for i in  libgfortran libquadmath ; do cp -dpf
/home/tvermeir/buildroot/bug-fortran/output/host/usr/arm-buildroot-linux-uclibcgnueabi/lib*/${i}.a
/home/tvermeir/buildroot/bug-fortran/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/
; done
cp: cannot stat
?/home/tvermeir/buildroot/bug-fortran/output/host/usr/arm-buildroot-linux-uclibcgnueabi/lib*/libquadmath.a?:
No such file or directory
package/pkg-generic.mk:205: recipe for target
'/home/tvermeir/buildroot/bug-fortran/output/build/host-gcc-final-4.9.3/.stamp_host_installed'
failed
make[1]: ***
[/home/tvermeir/buildroot/bug-fortran/output/build/host-gcc-final-4.9.3/.stamp_host_installed]
Error 1
Makefile:36: recipe for target '_all' failed
make: *** [_all] Error 2
---

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [Bug 8901] gcc failes to build if fortran is enabled
  2016-05-02 18:53 [Buildroot] [Bug 8901] New: gcc failes to build if fortran is enabled bugzilla at busybox.net
  2016-05-02 19:13 ` [Buildroot] [Bug 8901] " bugzilla at busybox.net
  2016-05-02 20:46 ` bugzilla at busybox.net
@ 2016-09-12 15:07 ` bugzilla at busybox.net
  2 siblings, 0 replies; 4+ messages in thread
From: bugzilla at busybox.net @ 2016-09-12 15:07 UTC (permalink / raw)
  To: buildroot

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

Thomas Petazzoni <thomas.petazzoni@free-electrons.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |WORKSFORME
             Status|NEW                         |RESOLVED

--- Comment #3 from Thomas Petazzoni <thomas.petazzoni@free-electrons.com> ---
The original patches from Samuel indeed did not fix the build issue on ARM
indeed. But in fact the patches from Samuel have not been committed upstream
as-is, but were improved to take into account the fact that libquadmath only
exists on i386 and x86_64. libquadmath is only copied if
BR2_TOOLCHAIN_HAS_LIBQUADMATH and BR2_TOOLCHAIN_HAS_LIBQUADMATH is only "y" on
i386 and x86_64.

I just tested qemu_arm_versatile_defconfig + Fortran supported enabled, and it
builds fine.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-09-12 15:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-02 18:53 [Buildroot] [Bug 8901] New: gcc failes to build if fortran is enabled bugzilla at busybox.net
2016-05-02 19:13 ` [Buildroot] [Bug 8901] " bugzilla at busybox.net
2016-05-02 20:46 ` bugzilla at busybox.net
2016-09-12 15:07 ` bugzilla at busybox.net

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox