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

Build failure (hackage-cli) with weird linker error (due to builder using v1-install) #1173

Open
andreasabel opened this issue Feb 3, 2023 · 7 comments

Comments

@andreasabel
Copy link
Member

See https://hackage.haskell.org/package/hackage-cli-0.1.0.0/reports/1

dieVerbatim: user error (Error: cabal: '/home/builder/.ghcup/ghc/9.2.4/bin/ghc-pkg-9.2.4' exited with an error:
z-hackage-cli-z-cabal-revisions-0.1.0.0: Warning: .:25:1: Unknown field: "library-dirs-static"
z-hackage-cli-z-cabal-revisions-0.1.0.0: installed package info from too old version of Cabal (key field does not match id field)
)

@gbaz
Copy link
Contributor

gbaz commented Feb 3, 2023

Interesting. I wonder if the hackage builder just has trouble in general with packages with internal libraries.

@gbaz
Copy link
Contributor

gbaz commented Feb 3, 2023

Note that builder still uses (for irritating reasons we should try to fix) v1-install. So it could be cabal v1-install itself chokes on such things.

@andreasabel
Copy link
Member Author

@gbaz: Your gut feeling was exactly right. I tried cabal v1-install locally and got the same error.

@banacorn
Copy link

banacorn commented Mar 1, 2023

Is there a thread about upgrading Hackage builder from cabal v1-install to cabal v2-install?

From what i've gathered these seem to be the remaining blocking issues: #821 (comment)

(The reason why we need cabal v2-build to work on Hackage is that, v2-build allows us to reference git commits withsource-repository-package)

@gbaz
Copy link
Contributor

gbaz commented Mar 1, 2023

That ticket sounds right. Many of those issues are resolved, so it might be worth having another go at things...

That said, using v2-build won't help with your situation. The source-repository-package stanza is part of the cabal.project file, and that does not affect builds from tarballs (including those uploaded to hackage). Hackage packages are expected to be buildable with regards to other hackage packages, by use of their cabal file alone.

@omelkonian
Copy link

omelkonian commented Oct 20, 2023

Getting the same error for a new package of mine, again providing an executable and internal library.

Moreover, like in the case of hackage-cli, the package home page does not include a "Modules" sections linking to the exposed modules (of the library) although the documentation has been "uploaded by the user" and can be accessed under .../agda2train/docs/.

EDIT: Looking through the server code, the empty module list in the home page is explained by a null ModIndex and can be traced down to the mdocIndex variable originating from a query to the tarIndexCache, which might suggest an issue with the index of tarballs?

@gbaz
Copy link
Contributor

gbaz commented Oct 21, 2023

The issue is the library is not agda2train but agda2train-lib. Hackage has an open ticket that's being worked on for display of multiple public libraries, which also applies when there's a single public library, but it isn't the default exposed one.

This is the same issue as reported above -- we can fix the display with the ticket being worked on, and to fix the building we need to move the builder to v2 install.

@gbaz gbaz changed the title Build failure (hackage-cli) with weird linker error Build failure (hackage-cli) with weird linker error (due to builder using v1-install) Oct 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants