Skip to content

in-source new-building gtk2hs/gtk3 #3425

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

Closed
lspitzner opened this issue May 12, 2016 · 4 comments
Closed

in-source new-building gtk2hs/gtk3 #3425

lspitzner opened this issue May 12, 2016 · 4 comments

Comments

@lspitzner
Copy link
Collaborator

lspitzner commented May 12, 2016

added a cabal.project to the project, try to new-build

> git clone https://github.com/lspitzner/gtk2hs.git --depth=5 --branch=new-build
> cd gtk2hs
> cabal new-build gtk/
Resolving dependencies...
In order, the following will be built (use -v for more details):
cairo-0.13.1.1
glib-0.13.2.2
gio-0.13.1.1
pango-0.13.1.1
gtk3-0.14.2
ghc-pkg: cannot create: $PROJECT/dist-newstyle/packagedb/ghc-7.10.3 already exists

first problem. [this might appear somewhat non-deterministically. or i messed up my testing once.] fixed by just trying again:

> cabal new-build gtk/
[tons of successful compilation, until:]
$PROJECT/dist-newstyle/build/gtk3-0.14.2/setup/setup.hs:1:1:
    Could not find module ‘Prelude’
    It is a member of the hidden package ‘base-4.8.2.0’.
    Perhaps you need to add ‘base’ to the build-depends in your .cabal file.
    Use -v to see a list of the files searched for.

This seems to resemble #3320 (or #3394), but the cabal.project already adds +build-demos, i thought. well, next workaround: add custom-setup:

(new clone because i delete the entire directory anyways to prevent any residual state between builds.)

> git clone https://github.com/lspitzner/gtk2hs.git --depth=5 --branch=new-build-workaround
> cd gtk2hs
> cabal new-build gtk/
[tons of successful compilation, until:]
Linking $PROJECT/dist-newstyle/build/gtk3-0.14.2/setup/setup ...
[1 of 2] Compiling Gtk2HsSetup      ( Gtk2HsSetup.hs, dist/setup-wrapper/Gtk2HsSetup.o )
[2 of 2] Compiling Main             ( SetupMain.hs, dist/setup-wrapper/Main.o )
Linking dist/setup-wrapper/setup ...
unrecognized 'configure' option `--profiling-detail=default'

unrecognized 'configure' option `--library-profiling-detail=default'

unrecognized 'configure' option `--ipid=gtk3-0.14.2-inplace'

not sure how to continue.

@lspitzner
Copy link
Collaborator Author

the -v output before the last error above, for the compilation of setup, is:

/usr/bin/ghc
 --make
 -fbuilding-cabal-package
 -odir $PROJECT/dist-newstyle/build/gtk3-0.14.2/setup
 -hidir $PROJECT/dist-newstyle/build/gtk3-0.14.2/setup
 -i
 -i$PROJECT/gtk
 -optP-include
 -optP$PROJECT/dist-newstyle/build/gtk3-0.14.2/setup/setup_macros.h
 -hide-all-packages
 -no-user-package-db
 -package-db /home/lsp/.cabal/store/ghc-7.10.3/package.db
 -package-db $PROJECT/dist-newstyle/packagedb/ghc-7.10.3
 -package-id Cabal-1.24.0.0-a42471777a73a03da1020057a8295e49190ec4361fbf2831ed81b97ce209ad9a
 -package-id base-4.8.2.0-0d6d1084fbc041e1cded9228e80e264d
 -package-id directory-1.2.2.0-f8e14a9d121b76a00a0f669ee724a732
 -package-id filepath-1.4.0.0-f97d1e4aebfd7a03be6980454fe31d6e
 -package-id process-1.2.3.0-78f206acb2330ea8066c6c19c87356f0
 $PROJECT/dist-newstyle/build/gtk3-0.14.2/setup/setup.hs
 -o $PROJECT/dist-newstyle/build/gtk3-0.14.2/setup/setup
 -threaded

so indeed it seems be using Cabal-1.24.0.0.

(no guarantee that this is the correct interpretation, or even relevant in general.)

@23Skidoo 23Skidoo added this to the cabal-install 1.26 milestone May 14, 2016
@lspitzner
Copy link
Collaborator Author

#3433 reports something similar to the last error for regular install. maybe that one is not new-build specific.

@lspitzner
Copy link
Collaborator Author

#3460 considers the first problem, probably.

@ezyang
Copy link
Contributor

ezyang commented Sep 3, 2016

Yes, I'm going to close this as two dupes. Thanks for the report!

@ezyang ezyang closed this as completed Sep 3, 2016
@ezyang ezyang modified the milestones: cabal-install 2.0, 2.0 (planned for next feature release) Sep 6, 2016
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

3 participants