static compile fails

Bug #1807176 reported by bra on 2018-12-06
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
stress-ng (Ubuntu)
Medium
Colin Ian King

Bug Description

Hi,

I would like to build this:
https://github.com/alexei-led/stress-ng/blob/master/Dockerfile
with latest stress-ng version (0.09.48), but fails with:
LD stress-ng
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libpthread.a(lowlevellock.o): In function `__lll_lock_wait_private':
/build/glibc-6V9RKT/glibc-2.19/nptl/../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:78: multiple definition of `__lll_lock_wait_private'
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libc.a(libc-lowlevellock.o):(.text+0x0): first defined here
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libpthread.a(lowlevellock.o): In function `__lll_unlock_wake_private':
/build/glibc-6V9RKT/glibc-2.19/nptl/../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:328: multiple definition of `__lll_unlock_wake_private'
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libc.a(libc-lowlevellock.o):(.text+0x30): first defined here
collect2: error: ld returned 1 exit status
Makefile:350: recipe for target 'stress-ng' failed

It can't be compiled in this way since 0.09.42.

bra (bra) on 2018-12-06
description: updated
Juhani Numminen (jsonic) wrote :

Hi,

Is this report about Ubuntu-provided binary or source packages, or about the upstream source from GitHub?
What is your version of Ubuntu and stress-ng?
Please provide the commands that you used, and the complete build log.

Regards,
Juhani

Changed in stress-ng (Ubuntu):
status: New → Incomplete
Changed in stress-ng (Ubuntu):
importance: Undecided → Medium
assignee: nobody → Colin Ian King (colin-king)
status: Incomplete → In Progress
Colin Ian King (colin-king) wrote :

Bisected, bad bisect:

commit ddfdb4cd880ce3a4e5ba108374a75956a6248c24 (HEAD, refs/bisect/bad)
Author: Colin Ian King <email address hidden>
Date: Tue Oct 2 10:23:53 2018 +0100

    Makefile: add -lc for non-Haiku, and -lnetfork for Haiku

    Signed-off-by: Colin Ian King <email address hidden>

Colin Ian King (colin-king) wrote :

Looks like the order should be -lpthread -lc to get the linking to work correctly.

Colin Ian King (colin-king) wrote :
Changed in stress-ng (Ubuntu):
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers