All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [Bug 10996] New: bogus musl ARM toolchain
@ 2018-05-08 12:41 bugzilla at busybox.net
  2018-05-11 15:53 ` [Buildroot] [Bug 10996] " bugzilla at busybox.net
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: bugzilla at busybox.net @ 2018-05-08 12:41 UTC (permalink / raw)
  To: buildroot

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

            Bug ID: 10996
           Summary: bogus musl ARM toolchain
           Product: buildroot
           Version: unspecified
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Other
          Assignee: unassigned at buildroot.uclibc.org
          Reporter: thomas.petazzoni at free-electrons.com
                CC: buildroot at uclibc.org
  Target Milestone: ---

The following defconfig doesn't build:

BR2_arm=y
BR2_cortex_a8=y
BR2_STATIC_LIBS=y
BR2_TOOLCHAIN_BUILDROOT_MUSL=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
BR2_PACKAGE_ZIP=y
# BR2_TARGET_ROOTFS_TAR is not set

It doesn't build because the toolchain is broken, and doesn't manage to link a
simple program like this:

$ cat foo.c 
int main(void) { mktime(); return 0; }

 ./output/host/bin/arm-linux-gcc -o foo foo.c
foo.c: In function ?main?:
foo.c:1:18: warning: implicit declaration of function ?mktime?
[-Wimplicit-function-declaration]
 int main(void) { mktime(); return 0; }
                  ^~~~~~
/home/thomas/projets/buildroot/output/host/lib/gcc/arm-buildroot-linux-musleabihf/6.4.0/libgcc.a(_dvmd_lnx.o):
In function `__aeabi_idiv0':
/home/thomas/projets/buildroot/output/build/host-gcc-final-6.4.0/build/arm-buildroot-linux-musleabihf/libgcc/../../../libgcc/config/arm/lib1funcs.S:1354:
undefined reference to `raise'
collect2: error: ld returned 1 exit status

This is causing the following build issues in our autobuilders:
http://autobuild.buildroot.net/?reason=zip%&libc=musl.

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

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

* [Buildroot] [Bug 10996] bogus musl ARM toolchain
  2018-05-08 12:41 [Buildroot] [Bug 10996] New: bogus musl ARM toolchain bugzilla at busybox.net
@ 2018-05-11 15:53 ` bugzilla at busybox.net
  2018-05-13 20:05 ` bugzilla at busybox.net
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: bugzilla at busybox.net @ 2018-05-11 15:53 UTC (permalink / raw)
  To: buildroot

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

--- Comment #1 from Thomas Petazzoni <thomas.petazzoni@free-electrons.com> ---
After discussing with the musl maintainers, this happens because we don't pass
-static. However, a similar setup works with uClibc.

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

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

* [Buildroot] [Bug 10996] bogus musl ARM toolchain
  2018-05-08 12:41 [Buildroot] [Bug 10996] New: bogus musl ARM toolchain bugzilla at busybox.net
  2018-05-11 15:53 ` [Buildroot] [Bug 10996] " bugzilla at busybox.net
@ 2018-05-13 20:05 ` bugzilla at busybox.net
  2018-05-13 20:16 ` bugzilla at busybox.net
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: bugzilla at busybox.net @ 2018-05-13 20:05 UTC (permalink / raw)
  To: buildroot

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

Yann E. MORIN <yann.morin.1998@free.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yann.morin.1998 at free.fr

--- Comment #2 from Yann E. MORIN <yann.morin.1998@free.fr> ---
(In reply to Thomas Petazzoni from comment #1)
> this happens because we don't pass -static.

But the autobuild failure that is referenced does use -static (with \ and
newlines added for readability):

   
home/peko/autobuild/instance-1/output/host/bin/arm-buildroot-linux-musleabihf-gcc
\
        -c -D_FILE_OFFSET_BITS=64 -Os \
        -static \
        -I. -DUNIX -DUIDGID_NOT_16BIT -DLARGE_FILE_SUPPORT -DUNICODE_SUPPORT
-DNO_MKTIME \
        -DNO_DIR -DHAVE_DIRENT_H -DHAVE_TERMIOS_H util.c

Regards,
Yann E. MORIN.

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

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

* [Buildroot] [Bug 10996] bogus musl ARM toolchain
  2018-05-08 12:41 [Buildroot] [Bug 10996] New: bogus musl ARM toolchain bugzilla at busybox.net
  2018-05-11 15:53 ` [Buildroot] [Bug 10996] " bugzilla at busybox.net
  2018-05-13 20:05 ` bugzilla at busybox.net
@ 2018-05-13 20:16 ` bugzilla at busybox.net
  2018-08-14 20:25 ` bugzilla at busybox.net
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: bugzilla at busybox.net @ 2018-05-13 20:16 UTC (permalink / raw)
  To: buildroot

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

--- Comment #3 from Thomas Petazzoni <thomas.petazzoni@free-electrons.com> ---
(In reply to Yann E. MORIN from comment #2)
Nope, because you're looking at the wrong place. The reason why the build fail
is because the "configuration" step which detects if mktime() is available or
not fails and concludes that mktime() is not available. See the string "
Check for mktime". Due to this, NO_MKTIME is defined, and this code path is
broken in util.c/timezone.c.

So there are really two problems:

 (1) That is doesn't detect the availability of mktime() because -static is not
passed during the detection test.

 (2) That the NO_MKTIME case is broken.

However, I believe (2) is not really relevant for Buildroot, as all three C
libraries provide mktime(). So all we need to fix is (1).

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

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

* [Buildroot] [Bug 10996] bogus musl ARM toolchain
  2018-05-08 12:41 [Buildroot] [Bug 10996] New: bogus musl ARM toolchain bugzilla at busybox.net
                   ` (2 preceding siblings ...)
  2018-05-13 20:16 ` bugzilla at busybox.net
@ 2018-08-14 20:25 ` bugzilla at busybox.net
  2018-08-14 22:31 ` bugzilla at busybox.net
  2018-08-15 11:38 ` bugzilla at busybox.net
  5 siblings, 0 replies; 7+ messages in thread
From: bugzilla at busybox.net @ 2018-08-14 20:25 UTC (permalink / raw)
  To: buildroot

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

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

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

--- Comment #4 from Thomas Petazzoni <thomas.petazzoni@free-electrons.com> ---
Closing this bug: the musl developers said that -static must be passed when
linking statically, even if the C library was built with static linking support
only.

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

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

* [Buildroot] [Bug 10996] bogus musl ARM toolchain
  2018-05-08 12:41 [Buildroot] [Bug 10996] New: bogus musl ARM toolchain bugzilla at busybox.net
                   ` (3 preceding siblings ...)
  2018-08-14 20:25 ` bugzilla at busybox.net
@ 2018-08-14 22:31 ` bugzilla at busybox.net
  2018-08-15 11:38 ` bugzilla at busybox.net
  5 siblings, 0 replies; 7+ messages in thread
From: bugzilla at busybox.net @ 2018-08-14 22:31 UTC (permalink / raw)
  To: buildroot

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

--- Comment #5 from Arnout Vandecappelle <arnout@mind.be> ---
(In reply to Thomas Petazzoni from comment #4)
There is still a bug though... I guess we should make sure that -static is
always passed under BR2_STATIC_LIBS=y.

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

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

* [Buildroot] [Bug 10996] bogus musl ARM toolchain
  2018-05-08 12:41 [Buildroot] [Bug 10996] New: bogus musl ARM toolchain bugzilla at busybox.net
                   ` (4 preceding siblings ...)
  2018-08-14 22:31 ` bugzilla at busybox.net
@ 2018-08-15 11:38 ` bugzilla at busybox.net
  5 siblings, 0 replies; 7+ messages in thread
From: bugzilla at busybox.net @ 2018-08-15 11:38 UTC (permalink / raw)
  To: buildroot

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

--- Comment #6 from Thomas Petazzoni <thomas.petazzoni@free-electrons.com> ---
(In reply to Arnout Vandecappelle from comment #5)
True, but what do you want to do about this, other than fixing each package?
You want to include -static in the toolchain wrapper?

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

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

end of thread, other threads:[~2018-08-15 11:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-08 12:41 [Buildroot] [Bug 10996] New: bogus musl ARM toolchain bugzilla at busybox.net
2018-05-11 15:53 ` [Buildroot] [Bug 10996] " bugzilla at busybox.net
2018-05-13 20:05 ` bugzilla at busybox.net
2018-05-13 20:16 ` bugzilla at busybox.net
2018-08-14 20:25 ` bugzilla at busybox.net
2018-08-14 22:31 ` bugzilla at busybox.net
2018-08-15 11:38 ` bugzilla at busybox.net

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.