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
gdb: clean up templates #29382
gdb: clean up templates #29382
Conversation
4696799
to
90d8ade
Compare
9c9c6c1
to
0237a33
Compare
srcpkgs/avr-gdb/template
Outdated
replaces="cross-avr-gdb>=0" | ||
|
||
if [ "${CROSS_BUILD}" ]; then | ||
# Make python3.x detection work in cross builds | ||
CFLAGS="-I${XBPS_CROSS_BASE}/${py3_inc}" | ||
CXXFLAGS="-I${XBPS_CROSS_BASE}/${py3_inc}" | ||
makedepends+=" libatomic_ops-devel" # guile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makedepends
should be unconditional (regarding cross builds), most of the time. Are you sure this isn't because you were cross building for a target like armv6l
, which fits under our XBPS_TARGET_NO_ATOMIC8
conditional?
Anyway, if this is guile related it should also be hidden behind vopt_if
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is what I get without libatomic_ops-devel
:
$ ./xbps-src -a aarch64-musl -o guile pkg gdb
…
configure: error: in `/builddir/gdb-10.1/gdb':
configure: error: linking guile version guile-2.2 test program failed
See `config.log' for more details
make[1]: *** [Makefile:9734: configure-gdb] Error 1
make[1]: *** Waiting for unfinished jobs....
$ grep -C1 'cannot find -latomic_ops' masterdir/builddir/gdb-10.1/gdb/config.log
configure:11330: aarch64-linux-musl-gcc -o conftest -fstack-clash-protection -D_FORTIFY_SOURCE=2 -O2 -pipe -march=armv8-a -I/usr/aarch64-linux-musl/usr/include/python3.9 -g -I/usr/aarch64-linux-musl/usr/include -I/usr/aarch64-linux-musl/usr/include -I/usr/aarch64-linux-musl/usr/include/guile/2.2 -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -L/usr/aarch64-linux-musl/usr/lib conftest.c -lncursesw -lm -lguile-2.2 -latomic_ops -lgc >&5
/usr/lib/gcc/aarch64-linux-musl/10.2.1/../../../../aarch64-linux-musl/bin/ld: cannot find -latomic_ops
collect2: error: ld returned 1 exit status
--
configure:11339: aarch64-linux-musl-gcc -o conftest -fstack-clash-protection -D_FORTIFY_SOURCE=2 -O2 -pipe -march=armv8-a -I/usr/aarch64-linux-musl/usr/include/python3.9 -g -I/usr/aarch64-linux-musl/usr/include -I/usr/aarch64-linux-musl/usr/include -I/usr/aarch64-linux-musl/usr/include/guile/2.2 -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -L/usr/aarch64-linux-musl/usr/lib conftest.c -lncursesw -lm -lguile-2.2 -latomic_ops -lgc >&5
/usr/lib/gcc/aarch64-linux-musl/10.2.1/../../../../aarch64-linux-musl/bin/ld: cannot find -latomic_ops
collect2: error: ld returned 1 exit status
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, pkgconfig on armv6l says:
Libs: -L${libdir} -lguile-2.2 -latomic_ops -lgc
I'd suggest adding libatomic_ops-devel
as a dependency of guile-devel
instead :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ping
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do I understand correctly that you suggest the following patch:
File: srcpkgs/guile/template
@@ -40,7 +40,7 @@ libguile_package() {
guile-devel_package() {
short_desc+=" - development files"
- depends="gmp-devel gc-devel guile>=${version}_${revision}"
+ depends="gmp-devel gc-devel guile>=${version}_${revision} libatomic_ops-devel"
pkg_install() {
vmove usr/bin/guile-config
vmove usr/include
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, no, there is the same bug as in #27320.
https://github.com/void-linux/void-packages/pull/29382/checks?check_run_id=2478214035
…
FAIL: numbers.test: Number-theoretic division: euclidean/: mixed types: (130.0 10/7)
FAIL: numbers.test: Number-theoretic division: euclidean/: mixed types: (130.0 -10/7)
FAIL: numbers.test: Number-theoretic division: floor/: mixed types: (130.0 10/7)
FAIL: numbers.test: Number-theoretic division: floor/: mixed types: (-130.0 -10/7)
FAIL: numbers.test: Number-theoretic division: ceiling/: mixed types: (130.0 -10/7)
FAIL: numbers.test: Number-theoretic division: ceiling/: mixed types: (-130.0 10/7)
FAIL: numbers.test: Number-theoretic division: truncate/: mixed types: (130.0 10/7)
FAIL: numbers.test: Number-theoretic division: truncate/: mixed types: (130.0 -10/7)
FAIL: numbers.test: Number-theoretic division: truncate/: mixed types: (-130.0 10/7)
FAIL: numbers.test: Number-theoretic division: truncate/: mixed types: (-130.0 -10/7)
…
4355408
to
0d7306c
Compare
fe9b63e
to
01bae33
Compare
Missing a revbump for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be working fine, thanks! Will wait if anyone else has reviews.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cross gdbs are missing gdbserver
now, so add configure arg --enable-gdbserver
.
$(vopt_if python 'python3-devel gettext-devel')" | ||
short_desc="GNU Debugger" | ||
configure_args="--target=arm-none-eabi --disable-werror --disable-nls --with-system-readline | ||
--with-system-gdbinit=/etc/gdb/gdbinit --with-system-zlib --without-isl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does avr-gdb
not have without-isl
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I honestly don't know. I am not sure why this library is needed here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cross gdbs are missing gdbserver now
With --enable-gdbserver
:
$ ./xbps-src pkg avr-gdb
...
/builddir/gdb-10.2/gdbserver/remote-utils.cc:1235: undefined reference to `using_threads'
/usr/bin/ld: server.o: in function `main':
/builddir/gdb-10.2/gdbserver/server.cc:3826: undefined reference to `initialize_low()'
...
I don't think that gdbserver makes sense for avr and arm-none-eabi.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Argh, sorry. My mind was in previous revisions of this PR.
Indeed, neither of those packages have gdbserver currently.
export gl_cv_func_gettimeofday_clobber=no | ||
export gl_cv_func_working_strerror=yes | ||
export gl_cv_func_strerror_0_works=yes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the commit message please mention that you could eliminate the gnulib env var overrides because they now guess correctly that musl behaves.
srcpkgs/gdb/template
Outdated
$(vopt_if debuginfod elfutils-devel)" | ||
hostmakedepends="pkg-config texinfo $(vopt_if python python3-devel) $(vopt_if guile guile)" | ||
makedepends="expat-devel ncurses-devel readline-devel zlib-devel $(vopt_if guile guile-devel) | ||
$(vopt_if python 'python3-devel gettext-devel') $(vopt_if debuginfod elfutils-devel)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i see you sorted the deps, so please sort the build options as well while at it
Also added build option for Guile. gnulib now detects musl correctly, so we don't need the overrides. Co-authored-by: Evgeny Ermakov <evgeny.v.ermakov@gmail.com>
Also added build option for Guile. Co-authored-by: Evgeny Ermakov <evgeny.v.ermakov@gmail.com>
Co-authored-by: Evgeny Ermakov <evgeny.v.ermakov@gmail.com>
I made a bunch of changes and update stuff. Thanks! |
Improved consistency across templates.
Also:
post_install
in srcpkgs/avr-gdb.General
Have the results of the proposed changes been tested?
Does it build and run successfully?
(Please choose at least one native build and, if supported, at least one cross build. More are better.)