I'm trying to build a static toolchain for x86_64, but I don't know what to do about the following error in the `toolchain/binutils/compile` stage - can anyone help?
I made sure I'm on the latest `master` (d16d5c903772765ff3c7e457ba54e94924d80ede), deleted my `.config`, and went through `menuconfig` changing only:
* The target to x86_64,
* The task to "create just a toolchain",
* Told it to build the toolchain statically in the advanced toolchain options, and
* Disabled parallel building (for more predictable errors).
I get:
```
Making all in src /usr/bin/gmake all-am /bin/sh ../libtool --tag=CXX --mode=link g++ -Wall -pthread -Wno-switch -static -Wl,-static -o gp-archive gp-archive.o ArchiveExp.o libgprofng.la -L../../zlib -lz libtool: link: g++ -Wall -pthread -Wno-switch -Wl,-static -o gp-archive gp-archive.o ArchiveExp.o ./.libs/libgprofng.a -L/home/john/tmp/openadk/toolchain_build_generic-x86_64_uclibc-ng/w-binutils-2.43.1-1/binutils-2.43.1/zlib -L/home/john/tmp/openadk/toolchain_build_generic-x86_64_uclibc-ng/w-binutils-2.43.1-1/binutils-2.43.1/libiberty /home/john/tmp/openadk/toolchain_build_generic-x86_64_uclibc-ng/w-binutils-2.43.1-1/binutils-2.43.1/opcodes/.libs/libopcodes.a /home/john/tmp/openadk/toolchain_build_generic-x86_64_uclibc-ng/w-binutils-2.43.1-1/binutils-2.43.1/bfd/.libs/libbfd.a -liberty -lpthread -ldl -lz -pthread /usr/bin/ld: cannot find -lgcc_s: No such file or directory /usr/bin/ld: cannot find -lgcc_s: No such file or directory collect2: error: ld returned 1 exit status
```
Any help would be appreciated!
Hi John,
git pull for two fixes, which allow static building of binutils/gcc.
What is your use case?
best regards Waldemar
John Graham wrote,
I'm trying to build a static toolchain for x86_64, but I don't know what to do about the following error in the `toolchain/binutils/compile` stage - can anyone help?
I made sure I'm on the latest `master` (d16d5c903772765ff3c7e457ba54e94924d80ede), deleted my `.config`, and went through `menuconfig` changing only:
The target to x86_64,
The task to "create just a toolchain",
Told it to build the toolchain statically in the advanced toolchain
options, and
- Disabled parallel building (for more predictable errors).
I get:
Making all in src /usr/bin/gmake all-am /bin/sh ../libtool --tag=CXX --mode=link g++ -Wall -pthread -Wno-switch -static -Wl,-static -o gp-archive gp-archive.o ArchiveExp.o libgprofng.la -L../../zlib -lz libtool: link: g++ -Wall -pthread -Wno-switch -Wl,-static -o gp-archive gp-archive.o ArchiveExp.o ./.libs/libgprofng.a -L/home/john/tmp/openadk/toolchain_build_generic-x86_64_uclibc-ng/w-binutils-2.43.1-1/binutils-2.43.1/zlib -L/home/john/tmp/openadk/toolchain_build_generic-x86_64_uclibc-ng/w-binutils-2.43.1-1/binutils-2.43.1/libiberty /home/john/tmp/openadk/toolchain_build_generic-x86_64_uclibc-ng/w-binutils-2.43.1-1/binutils-2.43.1/opcodes/.libs/libopcodes.a /home/john/tmp/openadk/toolchain_build_generic-x86_64_uclibc-ng/w-binutils-2.43.1-1/binutils-2.43.1/bfd/.libs/libbfd.a -liberty -lpthread -ldl -lz -pthread /usr/bin/ld: cannot find -lgcc_s: No such file or directory /usr/bin/ld: cannot find -lgcc_s: No such file or directory collect2: error: ld returned 1 exit status
Any help would be appreciated!
-- John Graham (he/him) Software Engineer
Codethink Ltd 3rd Floor Dale House 35 Dale Street Manchester M1 2HF United Kingdom
Codethink delivers cutting edge open source design, development and integration services.
http://codethink.co.uk Office: 0161 236 5575
dev mailing list -- dev@openadk.org To unsubscribe send an email to dev-leave@openadk.org
That's got it building - thanks very much!
We basically want the toolchain to be independent of the host, this is one way we're trying to see how well it works.
John
On 29/01/2025 16:22, Waldemar Brodkorb wrote:
Hi John,
git pull for two fixes, which allow static building of binutils/gcc.
What is your use case?
best regards Waldemar
John Graham wrote,
I'm trying to build a static toolchain for x86_64, but I don't know what to do about the following error in the `toolchain/binutils/compile` stage - can anyone help?
I made sure I'm on the latest `master` (d16d5c903772765ff3c7e457ba54e94924d80ede), deleted my `.config`, and went through `menuconfig` changing only:
The target to x86_64,
The task to "create just a toolchain",
Told it to build the toolchain statically in the advanced toolchain
options, and
- Disabled parallel building (for more predictable errors).
I get:
Making all in src /usr/bin/gmake all-am /bin/sh ../libtool --tag=CXX --mode=link g++ -Wall -pthread -Wno-switch -static -Wl,-static -o gp-archive gp-archive.o ArchiveExp.o libgprofng.la -L../../zlib -lz libtool: link: g++ -Wall -pthread -Wno-switch -Wl,-static -o gp-archive gp-archive.o ArchiveExp.o ./.libs/libgprofng.a -L/home/john/tmp/openadk/toolchain_build_generic-x86_64_uclibc-ng/w-binutils-2.43.1-1/binutils-2.43.1/zlib -L/home/john/tmp/openadk/toolchain_build_generic-x86_64_uclibc-ng/w-binutils-2.43.1-1/binutils-2.43.1/libiberty /home/john/tmp/openadk/toolchain_build_generic-x86_64_uclibc-ng/w-binutils-2.43.1-1/binutils-2.43.1/opcodes/.libs/libopcodes.a /home/john/tmp/openadk/toolchain_build_generic-x86_64_uclibc-ng/w-binutils-2.43.1-1/binutils-2.43.1/bfd/.libs/libbfd.a -liberty -lpthread -ldl -lz -pthread /usr/bin/ld: cannot find -lgcc_s: No such file or directory /usr/bin/ld: cannot find -lgcc_s: No such file or directory collect2: error: ld returned 1 exit status
Any help would be appreciated!
-- John Graham (he/him) Software Engineer
Codethink Ltd 3rd Floor Dale House 35 Dale Street Manchester M1 2HF United Kingdom
Codethink delivers cutting edge open source design, development and integration services.
http://codethink.co.uk Office: 0161 236 5575
dev mailing list -- dev@openadk.org To unsubscribe send an email to dev-leave@openadk.org