Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161023161708.GB19318@brightrain.aerifal.cx>
Date: Sun, 23 Oct 2016 12:17:08 -0400
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: Unable to build with --enable-shared

On Sun, Oct 23, 2016 at 02:22:28AM +0200, Samuel Sadok wrote:
> 2016-10-22 23:58 GMT+02:00 Szabolcs Nagy <nsz@...t70.net>:
> > * Samuel Sadok <innovation-labs@...install.ch> [2016-10-22 22:37:46 +0200]:
> >> I am unable to build musl with --enable-shared. Multiple issues in
> >> unrelated projects (e.g. here: https://bugs.swift.org/browse/SR-1023)
> >> suggest that the culprit is a change in behaviour between binutils
> >> 2.25 and 2.26.
> >>
> >
> > that bug is different, that's about object symbols
> >
> > (swift seems to misuse protected visibility objects,
> > and instead of fixing the problem they switched to the
> > gold linker which does not yet have the bfd linker fix,
> > such incompetence is frustrating..  however the issue
> > does not affect musl: we don't mark objects protected
> > to avoid issues with broken toolchains.)
> 
> That's precisely why I'm trying to get away from Apple.
> 
> >
> >> $ make
> >> [...]
> >> x86_64-pc-linux-gnu-gcc  -D_XOPEN_SOURCE=700 -I./arch/x86_64
> >> -I./arch/generic -Iobj/src/internal -I./src/internal -Iobj/include
> >> -I./include  -include vis.h -B/usr/local/bin/x86_64-pc-linux-gnu-
> >> -fPIC -c -o obj/src/process/posix_spawn.lo src/process/posix_spawn.c
> >
> > some flags are missing here.. e.g. freestanding flags
> 
> Thanks for the pointer, that turned out to be the problem.
> 
> I should mention that I am cross-compiling from macOS. Since I had a
> Linux VM flying around, I tried to build musl there (success) and
> compared the logs.
> Looking at config.mak, there apparently was a serious misconfiguration:
> 
> config.mak on the cross-build system (macOS):
> 
> CFLAGS_AUTO = -include vis.h
> CFLAGS_C99FSE =
> CFLAGS_MEMOPS =
> CFLAGS_NOSSP =
> LDFLAGS_AUTO =
> LIBCC =

This probably indicates something is wrong with your cross toolchain;
even if you manually fix config.mak, I would be concerned that
something might have been built wrong. What cross toolchain are you
using and how was it setup? How did you invoke configure?

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.