Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Info] Additional modifications necessary to build for current UNIX-like systems #45

Open
ghost opened this issue Sep 5, 2024 · 4 comments

Comments

@ghost
Copy link

ghost commented Sep 5, 2024

Current build succeeds with disabling --with-python=no for binutils-gdb and removal of -ffat-lto-objects and -flto in pthread-embedded/platform/psp/Makefile

COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/14/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-14.2.1_p20240831/work/gcc-14-20240831/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/14 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/14/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14 --disable-silent-rules --disable-dependency-tracking --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/14/python --enable-objc-gc --enable-languages=c,c++,d,go,objc,obj-c++,fortran,ada,m2,rust --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --disable-libunwind-exceptions --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 14.2.1_p20240831 p5' --with-gcc-major-version-only --enable-libstdcxx-time --enable-lto --disable-libstdcxx-pch --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-fixed-point --enable-targets=all --enable-libgomp --disable-libssp --disable-libada --enable-cet --disable-systemtap --disable-valgrind-annotations --enable-vtable-verify --with-zstd --with-isl --disable-isl-version-check --enable-default-pie --enable-host-pie --enable-host-bind-now --enable-default-ssp --disable-fixincludes --with-build-config='bootstrap-O3 bootstrap-lto bootstrap-cet'
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.2.1 20240831 (Gentoo 14.2.1_p20240831 p5) 
GNU assembler version 2.43.1 (x86_64-pc-linux-gnu) using BFD version (Gentoo 2.43 p2) 2.43.1
Python 3.13.0rc1 (main, Sep  5 2024, 20:25:23) [GCC 14.2.1 20240831]
Linux-6.10.8-gentoo x86_64 Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz GenuineIntel
@ghost ghost changed the title pthread-embedded needs removal of LTO flags in platform/psp/Makefile [Info] Additional modifications needed to build for current UNIX-like systems Sep 5, 2024
@ghost ghost changed the title [Info] Additional modifications needed to build for current UNIX-like systems [Info] Additional modifications necessary to build for current UNIX-like systems Sep 5, 2024
@sharkwouter
Copy link
Member

When the build is made within the GitHub Actions, we do build binutils without python support, to make the resulting binary work on more systems.

@ghost
Copy link
Author

ghost commented Sep 5, 2024

Yes, I already noticed post #8 but the modification is necessary for non GitHub Actions CI builds.

@sharkwouter
Copy link
Member

I am quite surprised that you are having issues on Gentoo to be honest. We have the toolchain building and running just fine on many distributions. Are you sure you are not just missing some libraries? What is the error message you are seeing?

@jopadan
Copy link

jopadan commented Sep 9, 2024

As you already know the reason for the --with-python=no workaround is:

  CXX    python/py-infevents.o
../../gdb/python/py-gdb-readline.c: In function ‘char* gdbpy_readline_wrapper(FILE*, FILE*, const char*)’:
../../gdb/python/py-gdb-readline.c:59:29: error: ‘_PyOS_ReadlineTState’ was not declared in this scope; did you mean ‘PyOS_Readline’?
   59 |       PyEval_RestoreThread (_PyOS_ReadlineTState);
      |                             ^~~~~~~~~~~~~~~~~~~~
      |                             PyOS_Readline
  CXX    python/py-infthread.o
make[2]: *** [Makefile:1897: python/py-gdb-readline.o] Error 1

Removal of -ffat-lto-objects and -flto in pthread-embedded is necessary for gcc-stage2 and pspsdk to avoid No LTO compiled in or enabled messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants