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

maxima: fix build with -o ~sbcl #46709

Merged
merged 1 commit into from
Oct 17, 2023
Merged

Conversation

tornaria
Copy link
Contributor

This is the default for aarch64.

Testing the changes

  • I tested the changes in this PR: briefly

Rework the patch use-shared-library.patch so the ecl binaries work as built, no need to use patchelf anymore. This way there should be no problem if maxima is needed to build the documentation.

OTOH, the documentation is currently shipped in the tarball, so we touch the correct files so that it won't be rebuilt.

This won't change the binary package, no need to revbump.

Cc: @dkwo

Fixes: #46293

This is the default for aarch64.
@tornaria
Copy link
Contributor Author

Ready to merge.

@dkwo
Copy link
Contributor

dkwo commented Oct 16, 2023

any reason we keep it nocross?

@dkwo
Copy link
Contributor

dkwo commented Oct 16, 2023

other than that, it looks good to me, thanks.

@tornaria
Copy link
Contributor Author

any reason we keep it nocross?

It doesn't cross build, does it?

@dkwo
Copy link
Contributor

dkwo commented Oct 16, 2023

Well, if I remove nocross and set $makedepends=hostmakedepends, then it almost does:

=> maxima-ecl-5.47.0_3: running post-install hook: 06-strip-and-debug-pkgs ...
/usr/bin/aarch64-linux-gnu-strip: Unable to recognise the format of the input file `/destdir/aarch64-linux-gnu/maxima-ecl-5.47.0/usr/lib/maxima/5.47.0/binary-ecl/libmaxima-ecl.so'
=> ERROR: maxima-ecl-5.47.0_3: failed to strip /usr/lib/maxima/5.47.0/binary-ecl/libmaxima-ecl.so
=> ERROR: maxima-ecl-5.47.0_3: post-install_06-strip-and-debug-pkgs: 'find ${PKGDESTDIR} -type f' exited with 1
=> ERROR:   in hook() at common/hooks/post-install/06-strip-and-debug-pkgs.sh:68
=> ERROR:   in run_func() at common/xbps-src/shutils/common.sh:57
=> ERROR:   in run_pkg_hooks() at common/xbps-src/shutils/common.sh:298
=> ERROR:   in main() at common/xbps-src/libexec/xbps-src-doinstall.sh:66

@dkwo
Copy link
Contributor

dkwo commented Oct 16, 2023

if I also remove the patch, then it builds fine

=> maxima-ecl-5.47.0_3: running pkg_install ...
=> ERROR: maxima-ecl-5.47.0_3: vinstall: cannot find 'src/binary-ecl/libmaxima-ecl.so'...
=> ERROR: maxima-ecl-5.47.0_3: pkg_install: 'return 1' exited with 1
=> ERROR:   in _noglob_helper() at common/environment/setup/install.sh:12
=> ERROR:   in pkg_install() at srcpkgs/maxima-ecl/template:134

I'll try again later.

@tornaria
Copy link
Contributor Author

if I also remove the patch, then it builds fine

=> maxima-ecl-5.47.0_3: running pkg_install ...
=> ERROR: maxima-ecl-5.47.0_3: vinstall: cannot find 'src/binary-ecl/libmaxima-ecl.so'...
=> ERROR: maxima-ecl-5.47.0_3: pkg_install: 'return 1' exited with 1
=> ERROR:   in _noglob_helper() at common/environment/setup/install.sh:12
=> ERROR:   in pkg_install() at srcpkgs/maxima-ecl/template:134

I'll try again later.

I'm not sure ecl will cross build. It's no good if the binary that you build is x86_64 instead of aarch64. The strip hook just happens to barf at libmaxima-ecl.so and not at maxima; that doesn't mean the maxima binary will work.

Just use file to see whether the binaries have been built for aarch64 or not. You can try that with maxima, maxima.fas and libmaxima-ecl.so after running do_build(), it doesn't matter if the do_install() step succeeds or not, the files are there. If they are good, we can figure out a way to fix the install, if they are not good, then no.

@dkwo
Copy link
Contributor

dkwo commented Oct 16, 2023

file gives /destdir/aarch64-linux-gnu/maxima-5.47.0/usr/bin/maxima: POSIX shell script, ASCII text executable

it seems one needs to do something like https://gitlab.com/spaghettisalat/jffi_repl_example/blob/master/app/src/main/lisp/asdf_libs/compile.lisp or https://gist.github.com/YasuakiHonda/98b2496f10642cdc080666b02b3db001 in order for ecl to use to the cross tool chain.

@tornaria
Copy link
Contributor Author

file gives /destdir/aarch64-linux-gnu/maxima-5.47.0/usr/bin/maxima: POSIX shell script, ASCII text executable

it seems one needs to do something like https://gitlab.com/spaghettisalat/jffi_repl_example/blob/master/app/src/main/lisp/asdf_libs/compile.lisp or https://gist.github.com/YasuakiHonda/98b2496f10642cdc080666b02b3db001 in order for ecl to use to the cross tool chain.

You have to do it on the binaries, that's just a script to decide which binary to run.

The binaries go into the binary-ecl subdir (while building, this is in src/binary-ecl in the build directory).

@dkwo
Copy link
Contributor

dkwo commented Oct 17, 2023

I see, thanks, then it gives src/binary-ecl/maxima: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=769c16a0c389d08792450a4cdd8663e0371273aa, for GNU/Linux 3.2.0, with debug_info, not stripped

@dkwo
Copy link
Contributor

dkwo commented Oct 17, 2023

let's fix nocross another time :)

@dkwo
Copy link
Contributor

dkwo commented Oct 17, 2023

@leahneukirchen Can this be merged?

@leahneukirchen leahneukirchen merged commit dcc17a9 into void-linux:master Oct 17, 2023
8 checks passed
@tornaria tornaria deleted the maxima branch October 20, 2023 00:45
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

Successfully merging this pull request may close these issues.

maxima fails to (natively) build using ecl
3 participants