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

Rewrite gac to not use libtool #4746

Merged
merged 2 commits into from
Jul 13, 2022

Conversation

fingolfin
Copy link
Member

@fingolfin fingolfin commented Feb 2, 2022

This is incomplete work in progress, but I wanted to post it here
just for reference. I'll hopefully be able to resume work on this
in the not so distant future.

For now, things to be done include:

Resolves #4172
Resolves #1307

@fingolfin
Copy link
Member Author

fingolfin commented Feb 18, 2022

Compiling NormalizInterface, we get:

gcc -m32 -m32 --coverage -L/home/runner/work/gap/gap -shared -m32 -lstdc++ -R/home/runner/work/gap/gap/pkg/NormalizInterface-1.3.0/NormalizInstallDir/lib -L/home/runner/work/gap/gap/pkg/NormalizInterface-1.3.0/NormalizInstallDir/lib -lnormaliz -o bin/x86_64-pc-linux-gnu-default32-kv8/NormalizInterface.so gen/src/normaliz.lo
gcc: error: unrecognized command line option ‘-R’

That's something to be fixed in NormalizInterface (not quite sure how yet, but one step after the other)

UPDATE: seems libtool turns -R/foo/bar into -Wl,-rpath -Wl,/foo/bar on Linux, so perhaps I should just teach gac to do that, too...

UPDATE2: on macOS, it seems to be ignored?

UPDATE3: ... though on macOS, one can still path the -rpath flag -- it has a different meaning, though, but that is irrelevant here. Point is, that would make for a very simple implementation.... I have no idea what it does on e.g. OpenBSD, FreeBSD, ... but I am not sure I care overly much right now...

UPDATE4: actually the latest NormalizInterface 1.3.1 won't use -R anymore so I'll just wait for the package distro to be updated again :-)

@fingolfin

This comment was marked as resolved.

@fingolfin fingolfin force-pushed the mh/gac-without-libtool branch 2 times, most recently from 019086a to 2605037 Compare February 19, 2022 01:25
Makefile.rules Outdated Show resolved Hide resolved
@fingolfin
Copy link
Member Author

Two failures left, both in building packages:

  1. NormalizInterface dies with the following error; this is already fixed in the latest release of the package (for unrelated reasons)
gcc -o bin/x86_64-pc-linux-gnu-default64-kv8/NormalizInterface.so gen/src/normaliz.lo --coverage -shared -lstdc++ -R/home/runner/work/gap/gap/pkg/NormalizInterface-1.3.0/NormalizInstallDir/lib -L/home/runner/work/gap/gap/pkg/NormalizInterface-1.3.0/NormalizInstallDir/lib -lnormaliz
  gcc: error: unrecognized command line option ‘-R’
  Makefile.gappkg:131: recipe for target 'bin/x86_64-pc-linux-gnu-default64-kv8/NormalizInterface.so' failed
  1. nq fails because it relies on getting the compiler/linker flags for accessing GMP from GAP. I'll think about how to best address this...

@fingolfin fingolfin force-pushed the mh/gac-without-libtool branch 2 times, most recently from a68cdca to bd214e7 Compare March 29, 2022 23:50
@fingolfin fingolfin force-pushed the mh/gac-without-libtool branch 3 times, most recently from 610032f to 2d438bf Compare April 4, 2022 21:27
@fingolfin
Copy link
Member Author

nq 2.5.8 resolved those issues! Sadly testpackages tests still fail because NormalizInterface crashes. Hmm. Maybe related to gap-system/PackageDistro#285 ? Anyway, I've next tried to build it using libnormaliz-dev instead, but that doesn't work in ubuntu-18.04. So I switched to ubuntu-latest -- which is fine, except that they've dropped 32bit support there sigh

@fingolfin

This comment was marked as outdated.

@fingolfin fingolfin force-pushed the mh/gac-without-libtool branch 2 times, most recently from ee22ba8 to 115a51e Compare April 22, 2022 11:14
@fingolfin fingolfin added this to the GAP 4.12.0 milestone Jun 30, 2022
@fingolfin
Copy link
Member Author

I'll try and see if I can get this ready for GAP 4.12.0.

Perhaps @ChrisJefferson has an idea why NormalizInterface might crash?

@fingolfin fingolfin changed the title WIP: change gac to not use libtool Rewrite gac to not use libtool Jul 5, 2022
@fingolfin fingolfin added the kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements label Jul 5, 2022
@fingolfin fingolfin force-pushed the mh/gac-without-libtool branch 4 times, most recently from d95730b to 659598d Compare July 9, 2022 14:32
@fingolfin fingolfin marked this pull request as ready for review July 9, 2022 21:13
@fingolfin
Copy link
Member Author

@ChrisJefferson this is finally ready for review and merging -- with the latest NormalizInterface update, that last blocker has been removed! Also, the patch is now fairly small, as I already got most of the changes merged separately.

@fingolfin fingolfin merged commit 9c343a4 into gap-system:master Jul 13, 2022
@fingolfin fingolfin deleted the mh/gac-without-libtool branch July 13, 2022 17:38
@fingolfin fingolfin changed the title Rewrite gac to not use libtool Rewrite gac to not use libtool Aug 17, 2022
@fingolfin fingolfin added release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes topic: gac GAP to C compiler labels Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes topic: build system topic: gac GAP to C compiler
Projects
None yet
2 participants