mailing list of musl libc
 help / color / mirror / code / Atom feed
* libgcc errors
@ 2014-10-07 18:54 stephen Turner
  2014-10-07 19:51 ` Szabolcs Nagy
  0 siblings, 1 reply; 18+ messages in thread
From: stephen Turner @ 2014-10-07 18:54 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 6845 bytes --]

Previously i emailed about an issue i was having with no response. I
rebuilt the cross toolchain with the latest versions and switched from 3.X
to 2.6 kernel headers to try to work around the issue but still get the
same error compiling libgcc of which now it points to a config.log.  I
pulled that log and here is the part leading up to the error, if you want
the rest or anything else please let me know.

Im trying to find out why after using the musl patch and specifying
--target or --host=i686-linux-musl I recieve this issue compiling libgcc,
 This only happens if i specify the host or target as musl.

I appreciate any help you can provide.



It was created by GNU C Runtime Library configure 1.0, which was
generated by GNU Autoconf 2.64.  Invocation command line was

  $ /root/code/gcc/libgcc/configure --cache-file=./config.cache
--with-cross-host=i686-pc-linux-gnu --prefix=/root/targetfs
--disable-bootstrap --disable-multilib --disable-shared --disable-nls
--disable-mudflap --disable-libmudflap --disable-libssp --disable-libgomp
--with-newlib --without-headers --with-sysroot=/root/targetfs/
--enable-languages=c,lto --program-transform-name=s&^&i686-linux-musl-&
--disable-option-checking --with-target-subdir=i686-linux-musl
--build=i686-pc-linux-gnu --host=i686-linux-musl --target=i686-linux-musl
--srcdir=../../../gcc/libgcc

## --------- ##
## Platform. ##
## --------- ##

hostname = debian
uname -m = i686
uname -r = 3.2.0-4-686-pae
uname -s = Linux
uname -v = #1 SMP Debian 3.2.60-1+deb7u3

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1980: creating cache ./config.cache
configure:2163: checking build system type
configure:2177: result: i686-pc-linux-gnu
configure:2197: checking host system type
configure:2210: result: i686-pc-linux-musl
configure:2307: checking for --enable-version-specific-runtime-libs
configure:2320: result: no
configure:2368: checking for a BSD-compatible install
configure:2436: result: /usr/bin/install -c
configure:2452: checking for gawk
configure:2479: result: mawk
configure:2579: checking for i686-linux-musl-ar
configure:2606: result: i686-linux-musl-ar
configure:2671: checking for i686-linux-musl-lipo
configure:2698: result: i686-linux-musl-lipo
configure:2763: checking for i686-linux-musl-nm
configure:2790: result: /root/code/gcc-build/./gcc/nm
configure:2855: checking for i686-linux-musl-ranlib
configure:2882: result: i686-linux-musl-ranlib
configure:2947: checking for i686-linux-musl-strip
configure:2974: result: i686-linux-musl-strip
configure:3036: checking whether ln -s works
configure:3040: result: yes
configure:3057: checking for i686-linux-musl-gcc
configure:3084: result: /root/code/gcc-build/./gcc/xgcc
-B/root/code/gcc-build/./gcc/ -B/root/targetfs/i686-linux-musl/bin/
-B/root/targetfs/i686-linux-musl/lib/ -isystem
/root/targetfs/i686-linux-musl/include -isystem
/root/targetfs/i686-linux-musl/sys-include
configure:3353: checking for C compiler version
configure:3362: /root/code/gcc-build/./gcc/xgcc
-B/root/code/gcc-build/./gcc/ -B/root/targetfs/i686-linux-musl/bin/
-B/root/targetfs/i686-linux-musl/lib/ -isystem
/root/targetfs/i686-linux-musl/include -isystem
/root/targetfs/i686-linux-musl/sys-include    --version >&5
xgcc (GCC) 4.9.0
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:3373: $? = 0
configure:3362: /root/code/gcc-build/./gcc/xgcc
-B/root/code/gcc-build/./gcc/ -B/root/targetfs/i686-linux-musl/bin/
-B/root/targetfs/i686-linux-musl/lib/ -isystem
/root/targetfs/i686-linux-musl/include -isystem
/root/targetfs/i686-linux-musl/sys-include    -v >&5
Reading specs from /root/code/gcc-build/./gcc/specs
COLLECT_GCC=/root/code/gcc-build/./gcc/xgcc
COLLECT_LTO_WRAPPER=/root/code/gcc-build/./gcc/lto-wrapper
Target: i686-linux-musl
Configured with: ../gcc/configure --prefix=/root/targetfs
--enable-languages=c --disable-bootstrap --disable-multilib
--disable-shared --disable-nls --disable-mudflap --disable-libmudflap
--disable-libssp --disable-libgomp --with-newlib --without-headers
--target=i686-linux-musl --with-sysroot=/root/targetfs/
Thread model: posix
gcc version 4.9.0 (GCC)
configure:3373: $? = 0
configure:3362: /root/code/gcc-build/./gcc/xgcc
-B/root/code/gcc-build/./gcc/ -B/root/targetfs/i686-linux-musl/bin/
-B/root/targetfs/i686-linux-musl/lib/ -isystem
/root/targetfs/i686-linux-musl/include -isystem
/root/targetfs/i686-linux-musl/sys-include    -V >&5
xgcc: error: unrecognized command line option '-V'
xgcc: fatal error: no input files
compilation terminated.
configure:3373: $? = 1
configure:3362: /root/code/gcc-build/./gcc/xgcc
-B/root/code/gcc-build/./gcc/ -B/root/targetfs/i686-linux-musl/bin/
-B/root/targetfs/i686-linux-musl/lib/ -isystem
/root/targetfs/i686-linux-musl/include -isystem
/root/targetfs/i686-linux-musl/sys-include    -qversion >&5
xgcc: error: unrecognized command line option '-qversion'
xgcc: fatal error: no input files
compilation terminated.
configure:3373: $? = 1
configure:3389: /root/code/gcc-build/./gcc/xgcc
-B/root/code/gcc-build/./gcc/ -B/root/targetfs/i686-linux-musl/bin/
-B/root/targetfs/i686-linux-musl/lib/ -isystem
/root/targetfs/i686-linux-musl/include -isystem
/root/targetfs/i686-linux-musl/sys-include    -o conftest -g -O2
conftest.c  >&5
/root/code/gcc-build/./gcc/as: 106: exec: --32: not found
configure:3392: $? = 1
configure:3580: checking for suffix of object files
configure:3602: /root/code/gcc-build/./gcc/xgcc
-B/root/code/gcc-build/./gcc/ -B/root/targetfs/i686-linux-musl/bin/
-B/root/targetfs/i686-linux-musl/lib/ -isystem
/root/targetfs/i686-linux-musl/include -isystem
/root/targetfs/i686-linux-musl/sys-include    -c -g -O2  conftest.c >&5
/root/code/gcc-build/./gcc/as: 106: exec: --32: not found
configure:3606: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU C Runtime Library 1.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL "http://www.gnu.org/software/libgcc/"
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:3620: error: in `/root/code/gcc-build/i686-linux-musl/libgcc':
configure:3623: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.

[-- Attachment #2: Type: text/html, Size: 8447 bytes --]

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

* Re: libgcc errors
  2014-10-07 18:54 libgcc errors stephen Turner
@ 2014-10-07 19:51 ` Szabolcs Nagy
  2014-10-07 21:32   ` stephen Turner
  0 siblings, 1 reply; 18+ messages in thread
From: Szabolcs Nagy @ 2014-10-07 19:51 UTC (permalink / raw)
  To: musl

* stephen Turner <stephen.n.turner@gmail.com> [2014-10-07 14:54:33 -0400]:
> configure:3362: /root/code/gcc-build/./gcc/xgcc
> -B/root/code/gcc-build/./gcc/ -B/root/targetfs/i686-linux-musl/bin/
> -B/root/targetfs/i686-linux-musl/lib/ -isystem
> /root/targetfs/i686-linux-musl/include -isystem
> /root/targetfs/i686-linux-musl/sys-include    -v >&5
> Reading specs from /root/code/gcc-build/./gcc/specs
> COLLECT_GCC=/root/code/gcc-build/./gcc/xgcc
> COLLECT_LTO_WRAPPER=/root/code/gcc-build/./gcc/lto-wrapper
> Target: i686-linux-musl
> Configured with: ../gcc/configure --prefix=/root/targetfs
> --enable-languages=c --disable-bootstrap --disable-multilib
> --disable-shared --disable-nls --disable-mudflap --disable-libmudflap
> --disable-libssp --disable-libgomp --with-newlib --without-headers
> --target=i686-linux-musl --with-sysroot=/root/targetfs/
> Thread model: posix
> gcc version 4.9.0 (GCC)
> configure:3373: $? = 0
> configure:3362: /root/code/gcc-build/./gcc/xgcc
> -B/root/code/gcc-build/./gcc/ -B/root/targetfs/i686-linux-musl/bin/
> -B/root/targetfs/i686-linux-musl/lib/ -isystem
> /root/targetfs/i686-linux-musl/include -isystem
> /root/targetfs/i686-linux-musl/sys-include    -V >&5
> xgcc: error: unrecognized command line option '-V'
> xgcc: fatal error: no input files
> compilation terminated.
> configure:3373: $? = 1
> configure:3362: /root/code/gcc-build/./gcc/xgcc
> -B/root/code/gcc-build/./gcc/ -B/root/targetfs/i686-linux-musl/bin/
> -B/root/targetfs/i686-linux-musl/lib/ -isystem
> /root/targetfs/i686-linux-musl/include -isystem
> /root/targetfs/i686-linux-musl/sys-include    -qversion >&5
> xgcc: error: unrecognized command line option '-qversion'
> xgcc: fatal error: no input files
> compilation terminated.
> configure:3373: $? = 1
> configure:3389: /root/code/gcc-build/./gcc/xgcc
> -B/root/code/gcc-build/./gcc/ -B/root/targetfs/i686-linux-musl/bin/
> -B/root/targetfs/i686-linux-musl/lib/ -isystem
> /root/targetfs/i686-linux-musl/include -isystem
> /root/targetfs/i686-linux-musl/sys-include    -o conftest -g -O2
> conftest.c  >&5
> /root/code/gcc-build/./gcc/as: 106: exec: --32: not found
> configure:3392: $? = 1

your as does not accept --32 for some reason
or it is called incorrectly in some way

so the first stage toolchain is broken

> configure:3580: checking for suffix of object files
> configure:3602: /root/code/gcc-build/./gcc/xgcc
> -B/root/code/gcc-build/./gcc/ -B/root/targetfs/i686-linux-musl/bin/
> -B/root/targetfs/i686-linux-musl/lib/ -isystem
> /root/targetfs/i686-linux-musl/include -isystem
> /root/targetfs/i686-linux-musl/sys-include    -c -g -O2  conftest.c >&5
> /root/code/gcc-build/./gcc/as: 106: exec: --32: not found
> configure:3606: $? = 1
> configure: failed program was:
> | /* confdefs.h */
> | #define PACKAGE_NAME "GNU C Runtime Library"
> | #define PACKAGE_TARNAME "libgcc"
> | #define PACKAGE_VERSION "1.0"
> | #define PACKAGE_STRING "GNU C Runtime Library 1.0"
> | #define PACKAGE_BUGREPORT ""
> | #define PACKAGE_URL "http://www.gnu.org/software/libgcc/"
> | /* end confdefs.h.  */
> |
> | int
> | main ()
> | {
> |
> |   ;
> |   return 0;
> | }
> configure:3620: error: in `/root/code/gcc-build/i686-linux-musl/libgcc':
> configure:3623: error: cannot compute suffix of object files: cannot compile
> See `config.log' for more details.


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

* Re: libgcc errors
  2014-10-07 19:51 ` Szabolcs Nagy
@ 2014-10-07 21:32   ` stephen Turner
  2014-10-07 22:59     ` Samuel Holland
  0 siblings, 1 reply; 18+ messages in thread
From: stephen Turner @ 2014-10-07 21:32 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 4928 bytes --]

/root/code/gcc-build/./gcc/as: 106: exec: --32: not found

I have a directory /root/code/ for all my programs to be compiled. the
directory root/code/gcc-build is separate from the root/code/gcc source
directory as they recommended a separate folder to compile in.  knowing
this, wouldn't the link above reference an "as" program that was recently
compiled as a part of the gcc make process since its in the previously
empty gcc-build directory? If not then while using the --with-sysroot flag
would it pull a copy of it from this directory or the host system?

I'm also confused why this happens when i define --host or --target but not
when i drop those ./configure options? If i had a issue with "as" wouldn't
it create a similar error when compiling for a native glibc system?

By my understanding the first stage toolchain is debian's since you would
be referencing the toolchain used to attempt to compile this package
correct? Which would be the same tool chain used before
to successfully compile a gcc-4.6.4 which could static link but not dynamic
due to the lack of --host --target use as i was advised.

I apologize for my lack of experience with building toolchains. if there is
a known good tutorial for this i will gladly ref it however the best i have
found is lfs embedded which i am currently using (and not working).

Thanks for your time and assistance.

On Tue, Oct 7, 2014 at 3:51 PM, Szabolcs Nagy <nsz@port70.net> wrote:

> * stephen Turner <stephen.n.turner@gmail.com> [2014-10-07 14:54:33 -0400]:
> > configure:3362: /root/code/gcc-build/./gcc/xgcc
> > -B/root/code/gcc-build/./gcc/ -B/root/targetfs/i686-linux-musl/bin/
> > -B/root/targetfs/i686-linux-musl/lib/ -isystem
> > /root/targetfs/i686-linux-musl/include -isystem
> > /root/targetfs/i686-linux-musl/sys-include    -v >&5
> > Reading specs from /root/code/gcc-build/./gcc/specs
> > COLLECT_GCC=/root/code/gcc-build/./gcc/xgcc
> > COLLECT_LTO_WRAPPER=/root/code/gcc-build/./gcc/lto-wrapper
> > Target: i686-linux-musl
> > Configured with: ../gcc/configure --prefix=/root/targetfs
> > --enable-languages=c --disable-bootstrap --disable-multilib
> > --disable-shared --disable-nls --disable-mudflap --disable-libmudflap
> > --disable-libssp --disable-libgomp --with-newlib --without-headers
> > --target=i686-linux-musl --with-sysroot=/root/targetfs/
> > Thread model: posix
> > gcc version 4.9.0 (GCC)
> > configure:3373: $? = 0
> > configure:3362: /root/code/gcc-build/./gcc/xgcc
> > -B/root/code/gcc-build/./gcc/ -B/root/targetfs/i686-linux-musl/bin/
> > -B/root/targetfs/i686-linux-musl/lib/ -isystem
> > /root/targetfs/i686-linux-musl/include -isystem
> > /root/targetfs/i686-linux-musl/sys-include    -V >&5
> > xgcc: error: unrecognized command line option '-V'
> > xgcc: fatal error: no input files
> > compilation terminated.
> > configure:3373: $? = 1
> > configure:3362: /root/code/gcc-build/./gcc/xgcc
> > -B/root/code/gcc-build/./gcc/ -B/root/targetfs/i686-linux-musl/bin/
> > -B/root/targetfs/i686-linux-musl/lib/ -isystem
> > /root/targetfs/i686-linux-musl/include -isystem
> > /root/targetfs/i686-linux-musl/sys-include    -qversion >&5
> > xgcc: error: unrecognized command line option '-qversion'
> > xgcc: fatal error: no input files
> > compilation terminated.
> > configure:3373: $? = 1
> > configure:3389: /root/code/gcc-build/./gcc/xgcc
> > -B/root/code/gcc-build/./gcc/ -B/root/targetfs/i686-linux-musl/bin/
> > -B/root/targetfs/i686-linux-musl/lib/ -isystem
> > /root/targetfs/i686-linux-musl/include -isystem
> > /root/targetfs/i686-linux-musl/sys-include    -o conftest -g -O2
> > conftest.c  >&5
> > /root/code/gcc-build/./gcc/as: 106: exec: --32: not found
> > configure:3392: $? = 1
>
> your as does not accept --32 for some reason
> or it is called incorrectly in some way
>
> so the first stage toolchain is broken
>
> > configure:3580: checking for suffix of object files
> > configure:3602: /root/code/gcc-build/./gcc/xgcc
> > -B/root/code/gcc-build/./gcc/ -B/root/targetfs/i686-linux-musl/bin/
> > -B/root/targetfs/i686-linux-musl/lib/ -isystem
> > /root/targetfs/i686-linux-musl/include -isystem
> > /root/targetfs/i686-linux-musl/sys-include    -c -g -O2  conftest.c >&5
> > /root/code/gcc-build/./gcc/as: 106: exec: --32: not found
> > configure:3606: $? = 1
> > configure: failed program was:
> > | /* confdefs.h */
> > | #define PACKAGE_NAME "GNU C Runtime Library"
> > | #define PACKAGE_TARNAME "libgcc"
> > | #define PACKAGE_VERSION "1.0"
> > | #define PACKAGE_STRING "GNU C Runtime Library 1.0"
> > | #define PACKAGE_BUGREPORT ""
> > | #define PACKAGE_URL "http://www.gnu.org/software/libgcc/"
> > | /* end confdefs.h.  */
> > |
> > | int
> > | main ()
> > | {
> > |
> > |   ;
> > |   return 0;
> > | }
> > configure:3620: error: in `/root/code/gcc-build/i686-linux-musl/libgcc':
> > configure:3623: error: cannot compute suffix of object files: cannot
> compile
> > See `config.log' for more details.
>

[-- Attachment #2: Type: text/html, Size: 6493 bytes --]

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

* Re: libgcc errors
  2014-10-07 21:32   ` stephen Turner
@ 2014-10-07 22:59     ` Samuel Holland
  2014-10-09 12:13       ` Andrew Bradford
  0 siblings, 1 reply; 18+ messages in thread
From: Samuel Holland @ 2014-10-07 22:59 UTC (permalink / raw)
  To: musl

On 10/07/2014 04:32 PM, Stephen Turner wrote:
> I apologize for my lack of experience with building toolchains. if
> there is a known good tutorial for this i will gladly ref it however
> the best i have found is lfs embedded which i am currently using (and
> not working).

Embedded/Cross LFS make things much more complicated than you need. You
can use the main LFS instructions to generate a native complier, 
applying these modifications:

1. $LFS_TGT needs to be $ARCH-linux-musl
2. Patch gcc every time you compile it
3. Use a non-broken version of gcc; I recommend 4.7.x
4. Of course, replace glibc with musl
5. You may need to disable some extra math/optimization libraries that
come with gcc; the musl-cross build script[0] may give you some hints.

Sysroot is generally more of a problem than it solves. It's really only 
useful for cross-compilers where you have a complete copy of your 
target's /usr somewehere. Another warning: gcc does not look in /lib or 
/include like you would want it to without patching like LFS does for 
/tools.

[0] 
https://bitbucket.org/GregorR/musl-cross/src/2dfead9ed81aa590a69f1e33992935da37dee931/build.sh?at=default#cl-131

-- 
Regards,
Samuel Holland <samuel@sholland.net>


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

* Re: libgcc errors
  2014-10-07 22:59     ` Samuel Holland
@ 2014-10-09 12:13       ` Andrew Bradford
  2014-10-09 14:46         ` stephen Turner
  2014-10-09 19:38         ` Samuel Holland
  0 siblings, 2 replies; 18+ messages in thread
From: Andrew Bradford @ 2014-10-09 12:13 UTC (permalink / raw)
  To: samuel; +Cc: musl

Hi Samuel,

On 10/07/2014 06:59 PM, Samuel Holland wrote:
> On 10/07/2014 04:32 PM, Stephen Turner wrote:
>> I apologize for my lack of experience with building toolchains. if
>> there is a known good tutorial for this i will gladly ref it however
>> the best i have found is lfs embedded which i am currently using (and
>> not working).
> 
> Embedded/Cross LFS make things much more complicated than you need. You
> can use the main LFS instructions to generate a native complier,
> applying these modifications:

Could you please provide more info on why you think the embedded Cross
LFS way [1] is more complicated than is needed?  How could it be made
more simple?  I'm happy to take suggestions for improvement.

[1]:http://cross-lfs.org/view/clfs-embedded/arm/

For the most part the toolchain building portion of embedded CLFS
follows Gregor's musl-cross.

Thanks,
Andrew


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

* Re: libgcc errors
  2014-10-09 12:13       ` Andrew Bradford
@ 2014-10-09 14:46         ` stephen Turner
  2014-10-09 15:49           ` stephen Turner
  2014-10-09 19:38         ` Samuel Holland
  1 sibling, 1 reply; 18+ messages in thread
From: stephen Turner @ 2014-10-09 14:46 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 453 bytes --]

Would someone be so kind as to refer me to the preferred musl gcc patch
repository? I am having soo many difficulties that i'm inclined to believe
i'm missing something other than the commands here.

Currently i run into one of two issues, I use --target and receive errors
with libgcc  or i use --host and receive errors with libiberty.  I will be
starting over from scratch including the host system in an attempt to
ensure a clean build environment.

[-- Attachment #2: Type: text/html, Size: 511 bytes --]

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

* Re: libgcc errors
  2014-10-09 14:46         ` stephen Turner
@ 2014-10-09 15:49           ` stephen Turner
  0 siblings, 0 replies; 18+ messages in thread
From: stephen Turner @ 2014-10-09 15:49 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 720 bytes --]

I have been using this version. is this a good patch repository?

https://bitbucket.org/GregorR/musl-cross/src/781295f7e633/patches/gcc-4.7.3-musl.diff?at=default


On Thu, Oct 9, 2014 at 10:46 AM, stephen Turner <stephen.n.turner@gmail.com>
wrote:

> Would someone be so kind as to refer me to the preferred musl gcc patch
> repository? I am having soo many difficulties that i'm inclined to believe
> i'm missing something other than the commands here.
>
> Currently i run into one of two issues, I use --target and receive errors
> with libgcc  or i use --host and receive errors with libiberty.  I will be
> starting over from scratch including the host system in an attempt to
> ensure a clean build environment.
>

[-- Attachment #2: Type: text/html, Size: 1215 bytes --]

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

* Re: libgcc errors
  2014-10-09 12:13       ` Andrew Bradford
  2014-10-09 14:46         ` stephen Turner
@ 2014-10-09 19:38         ` Samuel Holland
  2014-10-09 21:08           ` stephen Turner
  1 sibling, 1 reply; 18+ messages in thread
From: Samuel Holland @ 2014-10-09 19:38 UTC (permalink / raw)
  To: musl

On October 9, 2014 7:13:42 AM CDT, Andrew Bradford <andrew@bradfordembedded.com> wrote:
>Could you please provide more info on why you think the embedded Cross
>LFS way [1] is more complicated than is needed?  How could it be made
>more simple?  I'm happy to take suggestions for improvement.
>
>[1]:http://cross-lfs.org/view/clfs-embedded/arm/
>
>For the most part the toolchain building portion of embedded CLFS
>follows Gregor's musl-cross.

Because he doesn't need a cross compiler, only library isolation. Even the LFS method is more work than absolutely necessary. You could compile musl with your host GCC, then compile binutils and GCC with musl-gcc, and be done with it. I recommend the LFS way because 1) it works with C++ and 2) some people claim musl-gcc makes unreliable GCC builds.

Cross LFS makes sense when you're planning to use musl on another machine/architecture, but not (in my opinion) for making a native toolchain. I have no problems with CLFS; I just think it's the wrong tool for the job.

>Thanks,
>Andrew

-- 
Regards,
Samuel Holland <samuel@sholland.net>


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

* Re: libgcc errors
  2014-10-09 19:38         ` Samuel Holland
@ 2014-10-09 21:08           ` stephen Turner
  2014-10-09 21:43             ` Samuel Holland
  0 siblings, 1 reply; 18+ messages in thread
From: stephen Turner @ 2014-10-09 21:08 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 2280 bytes --]

Thanks Samuel,
 I would use the musl-gcc wrapper (and have) however once gcc is compiled
from it then it does not support dynamic linking due to the lack of --host
(suggested) or --target (what seems more appropriate to me) specified in
the configure flags. If i do specify it then i get all kinds of crazy
errors which is why i consulted this mailing list in the first place since
i have tried googling my way through documentation for a month prior to
asking for help.

Its my inexperienced opinion that simply switching libs from glibc6 to musl
should be relatively easy compared to the full cross compile. To me it
seems like it would be as easy as specifying a new lib when rebuilding gcc
and that would be all.

let me ask you one quick question. I went to the musl-cross website on
bitbucket/gregorr and grabbed the patch for 4.7.3, is that a good working
patch and gcc version? (all my errors seem to stem from compiling gcc) and
is there any special way to download it or just click the raw button and
wget the link  then "patch -Np1 -i file.name.diff"?

On Thu, Oct 9, 2014 at 3:38 PM, Samuel Holland <samuel@sholland.net> wrote:

> On October 9, 2014 7:13:42 AM CDT, Andrew Bradford <
> andrew@bradfordembedded.com> wrote:
> >Could you please provide more info on why you think the embedded Cross
> >LFS way [1] is more complicated than is needed?  How could it be made
> >more simple?  I'm happy to take suggestions for improvement.
> >
> >[1]:http://cross-lfs.org/view/clfs-embedded/arm/
> >
> >For the most part the toolchain building portion of embedded CLFS
> >follows Gregor's musl-cross.
>
> Because he doesn't need a cross compiler, only library isolation. Even the
> LFS method is more work than absolutely necessary. You could compile musl
> with your host GCC, then compile binutils and GCC with musl-gcc, and be
> done with it. I recommend the LFS way because 1) it works with C++ and 2)
> some people claim musl-gcc makes unreliable GCC builds.
>
> Cross LFS makes sense when you're planning to use musl on another
> machine/architecture, but not (in my opinion) for making a native
> toolchain. I have no problems with CLFS; I just think it's the wrong tool
> for the job.
>
> >Thanks,
> >Andrew
>
> --
> Regards,
> Samuel Holland <samuel@sholland.net>
>

[-- Attachment #2: Type: text/html, Size: 2998 bytes --]

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

* Re: libgcc errors
  2014-10-09 21:08           ` stephen Turner
@ 2014-10-09 21:43             ` Samuel Holland
  2014-10-09 21:55               ` stephen Turner
  2014-10-09 22:04               ` writeonce
  0 siblings, 2 replies; 18+ messages in thread
From: Samuel Holland @ 2014-10-09 21:43 UTC (permalink / raw)
  To: musl

On October 9, 2014 4:08:35 PM CDT, stephen Turner <stephen.n.turner@gmail.com> wrote:
>Thanks Samuel,
>I would use the musl-gcc wrapper (and have) however once gcc is compiled
>from it then it does not support dynamic linking due to the lack of --host
>(suggested) or --target (what seems more appropriate to me) specified in
>the configure flags. If i do specify it then i get all kinds of crazy
>errors which is why i consulted this mailing list in the first place since
>i have tried googling my way through documentation for a month prior to
>asking for help.

It took me an entire summer to figure this all out.

>Its my inexperienced opinion that simply switching libs from glibc6 to musl
>should be relatively easy compared to the full cross compile. To me it
>seems like it would be as easy as specifying a new lib when rebuilding gcc
>and that would be all.

It would be that easy if everything was statically linked.

>let me ask you one quick question. I went to the musl-cross website on
>bitbucket/gregorr and grabbed the patch for 4.7.3, is that a good working
>patch and gcc version? (all my errors seem to stem from compiling gcc) and
>is there any special way to download it or just click the raw button and
>wget the link  then "patch -Np1 -i file.name.diff"?

That is the correct file, and there is no special way to download it. Those steps will work. Your problems are not caused by a bad patch, but pollution from your host libc and toolchain. Dynamic linking is hard to get rid of. (I'm trying to avoid a rant here...)

If I might ask, what is your end goal? Maybe you'd have a better time starting with something like Alpine or Sabotage.

-- 
Regards,
Samuel Holland <samuel@sholland.net>


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

* Re: libgcc errors
  2014-10-09 21:43             ` Samuel Holland
@ 2014-10-09 21:55               ` stephen Turner
  2014-10-09 22:17                 ` stephen Turner
  2014-10-09 22:04               ` writeonce
  1 sibling, 1 reply; 18+ messages in thread
From: stephen Turner @ 2014-10-09 21:55 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 1282 bytes --]

>
>
> That is the correct file, and there is no special way to download it.
> Those steps will work. Your problems are not caused by a bad patch, but
> pollution from your host libc and toolchain. Dynamic linking is hard to get
> rid of. (I'm trying to avoid a rant here...)
>
> If I might ask, what is your end goal? Maybe you'd have a better time
> starting with something like Alpine or Sabotage.
>
> --
> Regards,
> Samuel Holland <samuel@sholland.net>
>


End goal would be the learning of how to do this and building my own linux
distro without being forced into one thing or another (i'm never happy with
something)  mostly learning and self reliance though.  I'm hoping it leads
to something much bigger but that's not a goal or expectation.  Then again,
i just love tinkering with stuff and with toddlers getting into everything
i currently don't have the space or ability to do my electronics projects
which leaves me going nuts without something to work on.

I've been using linux to some degree or form since the 486 was hot stuff so
it also seems like about time i learn what makes it tick. man i remember
getting a cyrix processor to replace my pentium thinking the increase in
mhz would be better but boy was i wrong!  k, enough of that. moving on to
newer things :)

[-- Attachment #2: Type: text/html, Size: 1777 bytes --]

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

* Re: libgcc errors
  2014-10-09 21:43             ` Samuel Holland
  2014-10-09 21:55               ` stephen Turner
@ 2014-10-09 22:04               ` writeonce
  1 sibling, 0 replies; 18+ messages in thread
From: writeonce @ 2014-10-09 22:04 UTC (permalink / raw)
  To: musl

On 10/09/2014 05:43 PM, Samuel Holland wrote:
> On October 9, 2014 4:08:35 PM CDT, stephen Turner <stephen.n.turner@gmail.com> wrote:
>> Thanks Samuel,
>> I would use the musl-gcc wrapper (and have) however once gcc is compiled
> >from it then it does not support dynamic linking due to the lack of --host
>> (suggested) or --target (what seems more appropriate to me) specified in
>> the configure flags. If i do specify it then i get all kinds of crazy
>> errors

These errors are partly the result of how gcc passes environment 
variables to the configure scripts and make recipes in its 
sub-directories.  In cbb, such errors were the motivation for 1) not 
using musl-gcc directly, but rather passing -specs=$specs_file to the 
gcc configure script, and 2) using the $script_xgcc_for_specs 
environment variable, and applying the related patch to gcc's Makefile.in.

>> which is why i consulted this mailing list in the first place since
>> i have tried googling my way through documentation for a month prior to
>> asking for help.
> It took me an entire summer to figure this all out.

+1 :)

>> Its my inexperienced opinion that simply switching libs from glibc6 to musl
>> should be relatively easy compared to the full cross compile. To me it
>> seems like it would be as easy as specifying a new lib when rebuilding gcc
>> and that would be all.
> It would be that easy if everything was statically linked.
>
>> let me ask you one quick question. I went to the musl-cross website on
>> bitbucket/gregorr and grabbed the patch for 4.7.3, is that a good working
>> patch and gcc version? (all my errors seem to stem from compiling gcc) and
>> is there any special way to download it or just click the raw button and
>> wget the link  then "patch -Np1 -i file.name.diff"?
> That is the correct file, and there is no special way to download it. Those steps will work. Your problems are not caused by a bad patch, but pollution from your host libc and toolchain. Dynamic linking is hard to get rid of. (I'm trying to avoid a rant here...)
>
> If I might ask, what is your end goal? Maybe you'd have a better time starting with something like Alpine or Sabotage.
>



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

* Re: libgcc errors
  2014-10-09 21:55               ` stephen Turner
@ 2014-10-09 22:17                 ` stephen Turner
  2014-10-10 21:01                   ` stephen Turner
  0 siblings, 1 reply; 18+ messages in thread
From: stephen Turner @ 2014-10-09 22:17 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 523 bytes --]

>
>
> I've been using linux to some degree or form since the 486 was hot stuff
> so it also seems like about time i learn what makes it tick. man i remember
> getting a cyrix processor to replace my pentium thinking the increase in
> mhz would be better but boy was i wrong!  k, enough of that. moving on to
> newer things :)
>

Correction, pentium., we just purchased a pentium computer so i took the
486 and installed a lilo booting redhat linux version 5.2? 6.2? i purchased
from a local software store.  good memories.

[-- Attachment #2: Type: text/html, Size: 834 bytes --]

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

* Re: libgcc errors
  2014-10-09 22:17                 ` stephen Turner
@ 2014-10-10 21:01                   ` stephen Turner
  2014-10-10 21:21                     ` Rich Felker
  2014-10-10 21:30                     ` Samuel Holland
  0 siblings, 2 replies; 18+ messages in thread
From: stephen Turner @ 2014-10-10 21:01 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 12066 bytes --]

As previously mentioned I wiped and installed a clean debian. I did a
absolute minimum default install no desktop etc compiled the latest stable
musl, m4, gmp, mpfr, mpc, and downloaded gcc 4.7.3 with gregorr/musl-cross
patch to match.  I ran the build based on the commands i found in his
script and even tried passing --disable-werror to no avail (it helped on
binutils so i figured it was worth a shot).  Libgcc still errors out when
using --target.

Its having a problem finding/using libmpc.so.3 but the paths appear to
point to the directory which it is located. to be sure i even specified
using the --with-mpc flag.

If you could please take a moment to help me with this i would appreciate
it. Libmpc is in /root/cross/i686-linux-musl/lib and i have copied my
config.log from the libgcc directory below




This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by GNU C Runtime Library configure 1.0, which was
generated by GNU Autoconf 2.64.  Invocation command line was

  $ /root/code/gcc/libgcc/configure --cache-file=./config.cache
--enable-multilib --with-cross-host=i686-pc-linux-gnu --prefix=/root/cross
--with-newlib --disable-libssp --disable-nls --disable-libquadmath
--disable-threads --disable-decimal-float --disable-shared
--disable-libmudflap --disable-libgomp --disable-libatomic --disable-werror
--enable-languages=c,lto --program-transform-name=s&^&i686-linux-musl-&
--disable-option-checking --with-target-subdir=i686-linux-musl
--build=i686-pc-linux-gnu --host=i686-linux-musl --target=i686-linux-musl
--srcdir=../../../gcc/libgcc

## --------- ##
## Platform. ##
## --------- ##

hostname = Stephen-linux
uname -m = i686
uname -r = 3.2.0-4-686-pae
uname -s = Linux
uname -v = #1 SMP Debian 3.2.60-1+deb7u3

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1976: creating cache ./config.cache
configure:2144: checking build system type
configure:2158: result: i686-pc-linux-gnu
configure:2178: checking host system type
configure:2191: result: i686-pc-linux-musl
configure:2289: checking for --enable-version-specific-runtime-libs
configure:2302: result: no
configure:2350: checking for a BSD-compatible install
configure:2418: result: /usr/bin/install -c
configure:2434: checking for gawk
configure:2461: result: mawk
configure:2561: checking for i686-linux-musl-ar
configure:2588: result: i686-linux-musl-ar
configure:2653: checking for i686-linux-musl-lipo
configure:2680: result: i686-linux-musl-lipo
configure:2745: checking for i686-linux-musl-nm
configure:2772: result: /root/code/gcc-build/./gcc/nm
configure:2837: checking for i686-linux-musl-ranlib
configure:2864: result: i686-linux-musl-ranlib
configure:2929: checking for i686-linux-musl-strip
configure:2956: result: i686-linux-musl-strip
configure:3018: checking whether ln -s works
configure:3022: result: yes
configure:3039: checking for i686-linux-musl-gcc
configure:3066: result: /root/code/gcc-build/./gcc/xgcc
-B/root/code/gcc-build/./gcc/ -B/root/cross/i686-linux-musl/bin/
-B/root/cross/i686-linux-musl/lib/ -isystem
/root/cross/i686-linux-musl/include -isystem
/root/cross/i686-linux-musl/sys-include
configure:3335: checking for C compiler version
configure:3344: /root/code/gcc-build/./gcc/xgcc
-B/root/code/gcc-build/./gcc/ -B/root/cross/i686-linux-musl/bin/
-B/root/cross/i686-linux-musl/lib/ -isystem
/root/cross/i686-linux-musl/include -isystem
/root/cross/i686-linux-musl/sys-include    --version >&5
xgcc (GCC) 4.7.3
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:3355: $? = 0
configure:3344: /root/code/gcc-build/./gcc/xgcc
-B/root/code/gcc-build/./gcc/ -B/root/cross/i686-linux-musl/bin/
-B/root/cross/i686-linux-musl/lib/ -isystem
/root/cross/i686-linux-musl/include -isystem
/root/cross/i686-linux-musl/sys-include    -v >&5
Reading specs from /root/code/gcc-build/./gcc/specs
COLLECT_GCC=/root/code/gcc-build/./gcc/xgcc
COLLECT_LTO_WRAPPER=/root/code/gcc-build/./gcc/lto-wrapper
Target: i686-linux-musl
Configured with: ../gcc/configure --prefix=/root/cross --enable-languages=c
--with-newlib --disable-libssp --disable-nls --disable-libquadmath
--disable-threads --disable-decimal-float --disable-shared
--disable-libmudflap --disable-libgomp --disable-libatomic --disable-werror
--target=i686-linux-musl
Thread model: single
gcc version 4.7.3 (GCC)
configure:3355: $? = 0
configure:3344: /root/code/gcc-build/./gcc/xgcc
-B/root/code/gcc-build/./gcc/ -B/root/cross/i686-linux-musl/bin/
-B/root/cross/i686-linux-musl/lib/ -isystem
/root/cross/i686-linux-musl/include -isystem
/root/cross/i686-linux-musl/sys-include    -V >&5
xgcc: error: unrecognized command line option '-V'
xgcc: fatal error: no input files
compilation terminated.
configure:3355: $? = 1
configure:3344: /root/code/gcc-build/./gcc/xgcc
-B/root/code/gcc-build/./gcc/ -B/root/cross/i686-linux-musl/bin/
-B/root/cross/i686-linux-musl/lib/ -isystem
/root/cross/i686-linux-musl/include -isystem
/root/cross/i686-linux-musl/sys-include    -qversion >&5
xgcc: error: unrecognized command line option '-qversion'
xgcc: fatal error: no input files
compilation terminated.
configure:3355: $? = 1
configure:3371: /root/code/gcc-build/./gcc/xgcc
-B/root/code/gcc-build/./gcc/ -B/root/cross/i686-linux-musl/bin/
-B/root/cross/i686-linux-musl/lib/ -isystem
/root/cross/i686-linux-musl/include -isystem
/root/cross/i686-linux-musl/sys-include    -o conftest -g -O2   conftest.c
 >&5
/root/code/gcc-build/./gcc/cc1: error while loading shared libraries:
libmpc.so.3: cannot open shared object file: No such file or directory
configure:3374: $? = 1
configure:3562: checking for suffix of object files
configure:3584: /root/code/gcc-build/./gcc/xgcc
-B/root/code/gcc-build/./gcc/ -B/root/cross/i686-linux-musl/bin/
-B/root/cross/i686-linux-musl/lib/ -isystem
/root/cross/i686-linux-musl/include -isystem
/root/cross/i686-linux-musl/sys-include    -c -g -O2  conftest.c >&5
/root/code/gcc-build/./gcc/cc1: error while loading shared libraries:
libmpc.so.3: cannot open shared object file: No such file or directory
configure:3588: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU C Runtime Library 1.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL "http://www.gnu.org/software/libgcc/"
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:3602: error: in `/root/code/gcc-build/i686-linux-musl/libgcc':
configure:3605: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=i686-pc-linux-gnu
ac_cv_env_CC_set=set
ac_cv_env_CC_value='/root/code/gcc-build/./gcc/xgcc
-B/root/code/gcc-build/./gcc/ -B/root/cross/i686-linux-musl/bin/
-B/root/cross/i686-linux-musl/lib/ -isystem
/root/cross/i686-linux-musl/include -isystem
/root/cross/i686-linux-musl/sys-include   '
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-g -O2'
ac_cv_env_CPPFLAGS_set=set
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=set
ac_cv_env_build_alias_value=i686-pc-linux-gnu
ac_cv_env_host_alias_set=set
ac_cv_env_host_alias_value=i686-linux-musl
ac_cv_env_target_alias_set=set
ac_cv_env_target_alias_value=i686-linux-musl
ac_cv_host=i686-pc-linux-musl
ac_cv_prog_AR=i686-linux-musl-ar
ac_cv_prog_AWK=mawk
ac_cv_prog_CC='/root/code/gcc-build/./gcc/xgcc
-B/root/code/gcc-build/./gcc/ -B/root/cross/i686-linux-musl/bin/
-B/root/cross/i686-linux-musl/lib/ -isystem
/root/cross/i686-linux-musl/include -isystem
/root/cross/i686-linux-musl/sys-include   '
ac_cv_prog_LIPO=i686-linux-musl-lipo
ac_cv_prog_NM=/root/code/gcc-build/./gcc/nm
ac_cv_prog_RANLIB=i686-linux-musl-ranlib
ac_cv_prog_STRIP=i686-linux-musl-strip

## ----------------- ##
## Output variables. ##
## ----------------- ##

AR='i686-linux-musl-ar'
AWK='mawk'
CC='/root/code/gcc-build/./gcc/xgcc -B/root/code/gcc-build/./gcc/
-B/root/cross/i686-linux-musl/bin/ -B/root/cross/i686-linux-musl/lib/
-isystem /root/cross/i686-linux-musl/include -isystem
/root/cross/i686-linux-musl/sys-include   '
CFLAGS='-g -O2'
CPP=''
CPPFLAGS=''
DEFS=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EXEEXT=''
INSTALL_DATA='/usr/bin/install -c -m 644'
INSTALL_PROGRAM='/usr/bin/install -c'
INSTALL_SCRIPT='/usr/bin/install -c'
LDFLAGS=''
LIBOBJS=''
LIBS=''
LIPO='i686-linux-musl-lipo'
LN_S='ln -s'
LTLIBOBJS=''
MAINT='#'
NM='/root/code/gcc-build/./gcc/nm'
OBJEXT=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME='GNU C Runtime Library'
PACKAGE_STRING='GNU C Runtime Library 1.0'
PACKAGE_TARNAME='libgcc'
PACKAGE_URL='http://www.gnu.org/software/libgcc/'
PACKAGE_VERSION='1.0'
PATH_SEPARATOR=':'
PICFLAG='-fpic'
RANLIB='i686-linux-musl-ranlib'
SHELL='/bin/bash'
STRIP='i686-linux-musl-strip'
ac_ct_CC=''
asm_hidden_op=''
bindir='${exec_prefix}/bin'
build='i686-pc-linux-gnu'
build_alias='i686-pc-linux-gnu'
build_cpu='i686'
build_libsubdir='build-i686-pc-linux-gnu'
build_os='linux-gnu'
build_subdir='build-i686-pc-linux-gnu'
build_vendor='pc'
cpu_type=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
decimal_float=''
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
double_type_size=''
dvidir='${docdir}'
enable_decimal_float='no'
enable_shared='no'
exec_prefix='NONE'
extra_parts=''
fixed_point=''
host='i686-pc-linux-musl'
host_alias='i686-linux-musl'
host_cpu='i686'
host_noncanonical='i686-linux-musl'
host_os='linux-musl'
host_subdir='.'
host_vendor='pc'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
libgcc_topdir='../../../gcc/libgcc/..'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
long_double_type_size=''
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/root/cross'
program_transform_name='s&^&i686-linux-musl-&'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
set_have_cc_tls=''
set_use_emutls=''
sfp_machine_header=''
sharedstatedir='${prefix}/com'
slibdir='$(exec_prefix)/$(host_noncanonical)/lib'
sysconfdir='${prefix}/etc'
target_alias='i686-linux-musl'
target_noncanonical='i686-linux-musl'
target_subdir='i686-linux-musl'
tm_defines=''
tm_file=''
tmake_file=''
toolexecdir='$(exec_prefix)/$(target_noncanonical)'
toolexeclibdir='$(toolexecdir)/lib'
vis_hide=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME "GNU C Runtime Library"
#define PACKAGE_TARNAME "libgcc"
#define PACKAGE_VERSION "1.0"
#define PACKAGE_STRING "GNU C Runtime Library 1.0"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL "http://www.gnu.org/software/libgcc/"

configure: exit 1





On Thu, Oct 9, 2014 at 6:17 PM, stephen Turner <stephen.n.turner@gmail.com>
wrote:

>
>> I've been using linux to some degree or form since the 486 was hot stuff
>> so it also seems like about time i learn what makes it tick. man i remember
>> getting a cyrix processor to replace my pentium thinking the increase in
>> mhz would be better but boy was i wrong!  k, enough of that. moving on to
>> newer things :)
>>
>
> Correction, pentium., we just purchased a pentium computer so i took the
> 486 and installed a lilo booting redhat linux version 5.2? 6.2? i purchased
> from a local software store.  good memories.
>

[-- Attachment #2: Type: text/html, Size: 16792 bytes --]

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

* Re: libgcc errors
  2014-10-10 21:01                   ` stephen Turner
@ 2014-10-10 21:21                     ` Rich Felker
  2014-10-10 21:28                       ` Samuel Holland
  2014-10-10 21:30                     ` Samuel Holland
  1 sibling, 1 reply; 18+ messages in thread
From: Rich Felker @ 2014-10-10 21:21 UTC (permalink / raw)
  To: musl

On Fri, Oct 10, 2014 at 05:01:10PM -0400, stephen Turner wrote:
> As previously mentioned I wiped and installed a clean debian. I did a
> absolute minimum default install no desktop etc compiled the latest stable
> musl, m4, gmp, mpfr, mpc, and downloaded gcc 4.7.3 with gregorr/musl-cross
> patch to match.  I ran the build based on the commands i found in his
> script and even tried passing --disable-werror to no avail (it helped on
> binutils so i figured it was worth a shot).  Libgcc still errors out when
> using --target.
> 
> Its having a problem finding/using libmpc.so.3 but the paths appear to
> point to the directory which it is located. to be sure i even specified
> using the --with-mpc flag.

Did you install the development packages? On Debian the libXXXX
packages are only for running programs that need libXXXX, not
compiling/linking programs which need them.

> If you could please take a moment to help me with this i would appreciate
> it. Libmpc is in /root/cross/i686-linux-musl/lib and i have copied my
> config.log from the libgcc directory below

If you just use Gregor's scripts directly, everything should work
fine. Have you tried just running the musl-cross build unchanged and
seeing if it succeeds? This would tell you right away whether you have
a problem with your build environment/packages, or with your own
custom commands. Then, assuming it's the latter, you can try making
controlled changes until you figure out what you're doing wrong.

Rich


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

* Re: libgcc errors
  2014-10-10 21:21                     ` Rich Felker
@ 2014-10-10 21:28                       ` Samuel Holland
  0 siblings, 0 replies; 18+ messages in thread
From: Samuel Holland @ 2014-10-10 21:28 UTC (permalink / raw)
  To: musl

On October 10, 2014 4:21:36 PM CDT, Rich Felker <dalias@libc.org> wrote:
>If you just use Gregor's scripts directly, everything should work
>fine. Have you tried just running the musl-cross build unchanged and
>seeing if it succeeds? This would tell you right away whether you have
>a problem with your build environment/packages, or with your own
>custom commands. Then, assuming it's the latter, you can try making
>controlled changes until you figure out what you're doing wrong.

I think he's got everything correct now. He's just missing telling musl where to find shared libs.

>Rich

-- 
Regards,
Samuel Holland <samuel@sholland.net>


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

* Re: libgcc errors
  2014-10-10 21:01                   ` stephen Turner
  2014-10-10 21:21                     ` Rich Felker
@ 2014-10-10 21:30                     ` Samuel Holland
  2014-10-16 17:35                       ` stephen Turner
  1 sibling, 1 reply; 18+ messages in thread
From: Samuel Holland @ 2014-10-10 21:30 UTC (permalink / raw)
  To: musl

On October 10, 2014 4:01:10 PM CDT, stephen Turner <stephen.n.turner@gmail.com> wrote:
>As previously mentioned I wiped and installed a clean debian. I did a
>absolute minimum default install no desktop etc compiled the latest
>stable
>musl, m4, gmp, mpfr, mpc, and downloaded gcc 4.7.3 with
>gregorr/musl-cross
>patch to match.

I'm assuming you're using musl-gcc to compile m4, gmp, mpfr, mpc, binutils(!), and gcc.

>Its having a problem finding/using libmpc.so.3 but the paths appear to
>point to the directory which it is located. to be sure i even specified
>using the --with-mpc flag.

You're almost there! All you have to do is tell musl where to find shared libraries. From the documentation:

../etc/ld-musl-$(ARCH).path, taken relative to the location of the "program interpreter" specified in the program's headers - if present, this will be processed as a text file containing the shared library search path, with components delimited by newlines or colons. If absent, a default path of"/lib:/usr/local/lib:/usr/lib" will be used. Not used by static-linked programs.

You need make that file and put /root/cross/i686-linux-musl/lib in there. You compiled gcc fine, but the new gcc's backend isn't running because it can't find the shared libraries you compiled earlier because they aren't in a standard path.

-- 
Regards,
Samuel Holland <samuel@sholland.net>


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

* Re: libgcc errors
  2014-10-10 21:30                     ` Samuel Holland
@ 2014-10-16 17:35                       ` stephen Turner
  0 siblings, 0 replies; 18+ messages in thread
From: stephen Turner @ 2014-10-16 17:35 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 2172 bytes --]

thank you both for your help. It appears i had a combination of issues yet
again that i had to work through (incompatible math lib versions? and bad
binutils builds?) but now I think i have a successful cross toolchain.
 currently it appears to be linked to the local libs libm.so.6 and
libc.so.6 dynamically even though i specified static and used the musl-gcc
wrapper but it did successfully build for the target i686-linux-musl

Ironically somehow looking into setting up the /etc/ld-musl-$ARCH.path file
led me to notice the issue with the math libs. sleep deprivation however
prevents me from remembering that weird thought pattern :-p

thanks again!

On Fri, Oct 10, 2014 at 5:30 PM, Samuel Holland <samuel@sholland.net> wrote:

> On October 10, 2014 4:01:10 PM CDT, stephen Turner <
> stephen.n.turner@gmail.com> wrote:
> >As previously mentioned I wiped and installed a clean debian. I did a
> >absolute minimum default install no desktop etc compiled the latest
> >stable
> >musl, m4, gmp, mpfr, mpc, and downloaded gcc 4.7.3 with
> >gregorr/musl-cross
> >patch to match.
>
> I'm assuming you're using musl-gcc to compile m4, gmp, mpfr, mpc,
> binutils(!), and gcc.
>
> >Its having a problem finding/using libmpc.so.3 but the paths appear to
> >point to the directory which it is located. to be sure i even specified
> >using the --with-mpc flag.
>
> You're almost there! All you have to do is tell musl where to find shared
> libraries. From the documentation:
>
> ../etc/ld-musl-$(ARCH).path, taken relative to the location of the
> "program interpreter" specified in the program's headers - if present, this
> will be processed as a text file containing the shared library search path,
> with components delimited by newlines or colons. If absent, a default path
> of"/lib:/usr/local/lib:/usr/lib" will be used. Not used by static-linked
> programs.
>
> You need make that file and put /root/cross/i686-linux-musl/lib in there.
> You compiled gcc fine, but the new gcc's backend isn't running because it
> can't find the shared libraries you compiled earlier because they aren't in
> a standard path.
>
> --
> Regards,
> Samuel Holland <samuel@sholland.net>
>

[-- Attachment #2: Type: text/html, Size: 2838 bytes --]

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

end of thread, other threads:[~2014-10-16 17:35 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-07 18:54 libgcc errors stephen Turner
2014-10-07 19:51 ` Szabolcs Nagy
2014-10-07 21:32   ` stephen Turner
2014-10-07 22:59     ` Samuel Holland
2014-10-09 12:13       ` Andrew Bradford
2014-10-09 14:46         ` stephen Turner
2014-10-09 15:49           ` stephen Turner
2014-10-09 19:38         ` Samuel Holland
2014-10-09 21:08           ` stephen Turner
2014-10-09 21:43             ` Samuel Holland
2014-10-09 21:55               ` stephen Turner
2014-10-09 22:17                 ` stephen Turner
2014-10-10 21:01                   ` stephen Turner
2014-10-10 21:21                     ` Rich Felker
2014-10-10 21:28                       ` Samuel Holland
2014-10-10 21:30                     ` Samuel Holland
2014-10-16 17:35                       ` stephen Turner
2014-10-09 22:04               ` writeonce

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).