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

InstallPlan: internal error: configured package depends on a non-library #3428

Closed
hvr opened this issue May 13, 2016 · 7 comments
Closed

InstallPlan: internal error: configured package depends on a non-library #3428

hvr opened this issue May 13, 2016 · 7 comments

Comments

@hvr
Copy link
Member

hvr commented May 13, 2016

How to reproduce (may need a patched zip-archive to workaround #3394) on Linux:

$ cabal --version
cabal-install version 1.25.0.0
compiled using version 1.25.0.0 of the Cabal library 

$ cabal get stack-1.1.0
$ cd stack-1.1.0/
$ rm -rf ~/.cabal/store/ghc-7.10.3/
$ cabal new-build -w /opt/ghc/7.10.3/bin/ghc -j1
...
...9 minutes later...
...
Installing library in
/home/hvr/.cabal/store/ghc-7.10.3/contravariant-1.4-dd9e9b1a816c583cb7d8c8cb1ef6e5b1bcf00436d015ed7c23508c898b03eb7f/lib
Creating package registration file:
/tmp/stack-1.1.0/dist-newstyle/tmp/package-registration--14768/pkgConf
InstallPlan: internal error: configured package depends on a non-library
package
CallStack (from HasCallStack):
error, called at ./Distribution/Client/InstallPlan.hs:322:21 in
main:Distribution.Client.InstallPlan

/cc @dcoutts @kosmikus

@hvr
Copy link
Member Author

hvr commented May 13, 2016

restarting the build after the first failure:

$ cabal new-build -j1
In order, the following will be built (use -v for more details):
comonad-5
bifunctors-5.3
conduit-1.2.6.6
conduit-extra-1.1.13.1
cryptohash-conduit-0.1.1
http-client-0.4.28
monad-logger-0.3.18
persistent-2.5
persistent-sqlite-2.5
persistent-template-2.5.1.1
profunctors-5.2
project-template-0.2.0
semigroupoids-5.0.1
free-4.12.4
either-4.4.1.1
optparse-simple-0.0.3
x509-system-1.6.3
x509-validation-1.6.3
tls-1.3.8
connection-0.2.5
http-client-tls-0.2.4
http-conduit-2.1.10.1
yaml-0.8.17.1
hpack-0.14.0
stack-1.1.0
[1 of 1] Compiling Main             ( /tmp/stack-1.1.0/dist-newstyle/tmp/comonad-17509/comonad-5/dist/setup/setup.hs, /tmp/stack-1.1.0/dist-newstyle/tmp/comonad-17509/comonad-5/dist/setup/Main.o )
Linking /tmp/stack-1.1.0/dist-newstyle/tmp/comonad-17509/comonad-5/dist/setup/setup ...
Configuring comonad-5...
Building comonad-5...
Preprocessing library comonad-5...
[ 1 of 15] Compiling Data.Functor.Composition ( src/Data/Functor/Composition.hs, dist/build/Data/Functor/Composition.o )
[ 2 of 15] Compiling Control.Comonad.Trans.Identity ( src/Control/Comonad/Trans/Identity.hs, dist/build/Control/Comonad/Trans/Identity.o )
[ 3 of 15] Compiling Control.Comonad  ( src/Control/Comonad.hs, dist/build/Control/Comonad.o )
[ 4 of 15] Compiling Control.Comonad.Trans.Class ( src/Control/Comonad/Trans/Class.hs, dist/build/Control/Comonad/Trans/Class.o )
[ 5 of 15] Compiling Control.Comonad.Hoist.Class ( src/Control/Comonad/Hoist/Class.hs, dist/build/Control/Comonad/Hoist/Class.o )
[ 6 of 15] Compiling Control.Comonad.Trans.Env ( src/Control/Comonad/Trans/Env.hs, dist/build/Control/Comonad/Trans/Env.o )
[ 7 of 15] Compiling Control.Comonad.Trans.Store ( src/Control/Comonad/Trans/Store.hs, dist/build/Control/Comonad/Trans/Store.o )
[ 8 of 15] Compiling Control.Comonad.Trans.Traced ( src/Control/Comonad/Trans/Traced.hs, dist/build/Control/Comonad/Trans/Traced.o )
[ 9 of 15] Compiling Control.Comonad.Env.Class ( src/Control/Comonad/Env/Class.hs, dist/build/Control/Comonad/Env/Class.o )
[10 of 15] Compiling Control.Comonad.Env ( src/Control/Comonad/Env.hs, dist/build/Control/Comonad/Env.o )
[11 of 15] Compiling Control.Comonad.Identity ( src/Control/Comonad/Identity.hs, dist/build/Control/Comonad/Identity.o )
[12 of 15] Compiling Control.Comonad.Store.Class ( src/Control/Comonad/Store/Class.hs, dist/build/Control/Comonad/Store/Class.o )
[13 of 15] Compiling Control.Comonad.Store ( src/Control/Comonad/Store.hs, dist/build/Control/Comonad/Store.o )
[14 of 15] Compiling Control.Comonad.Traced.Class ( src/Control/Comonad/Traced/Class.hs, dist/build/Control/Comonad/Traced/Class.o )
[15 of 15] Compiling Control.Comonad.Traced ( src/Control/Comonad/Traced.hs, dist/build/Control/Comonad/Traced.o )
In-place registering comonad-5...
Installing library in
/home/hvr/.cabal/store/ghc-7.10.3/comonad-5-17d250e13c7c0583cede5ff4e74088ed06285de11cfc16ce872c5724f81f84ea/lib
Creating package registration file:
/tmp/stack-1.1.0/dist-newstyle/tmp/package-registration--17509/pkgConf
InstallPlan: internal error: configured package depends on a non-library
package
CallStack (from HasCallStack):
error, called at ./Distribution/Client/InstallPlan.hs:322:21 in
main:Distribution.Client.InstallPlan

cabal new-build -j1 can be restarted a few times, and it manages to build a couple of packages each time...

@23Skidoo 23Skidoo added this to the cabal-install 1.26 milestone May 13, 2016
@BardurArantsson
Copy link
Collaborator

Just to add a data point: I've observed a very similar error message when building using setup-dev.sh... which isn't using new-build, so it may be unrelated to new-build per se. I only observed the one failure, and then restarting the build (disabling the sandbox removal, etc.) got through the rest of the build.

@ezyang
Copy link
Contributor

ezyang commented May 18, 2016

Last time this happened: #3345 but the issue reported there should have been fixed.

@dcoutts
Copy link
Contributor

dcoutts commented May 30, 2016

I think I've identified the problem. If I'm right I'll be blaming @ezyang ;-), erm I'll be blaming lack of test coverage :-)

@ezyang
Copy link
Contributor

ezyang commented May 30, 2016

Well do share ;)

On May 30, 2016 3:54:49 PM GMT-05:00, Duncan Coutts [email protected] wrote:

I think I've identified the problem. If I'm right I'll be blaming
@ezyang ;-), erm I'll be blaming lack of test coverage :-)


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#3428 (comment)

Sent from my Android device with K-9 Mail. Please excuse my brevity.

dcoutts added a commit to dcoutts/cabal that referenced this issue May 30, 2016
Check that we do get the registration info we expect in a couple places,
and add detail to the error message originally reported in haskell#3428.

Also build the integration tests with assertions on, which might have
caught this error earlier (via the invariant for the install plan).
@dcoutts
Copy link
Contributor

dcoutts commented May 30, 2016

@ezyang it's one of those annoying foo vs foo' errors.

dcoutts added a commit that referenced this issue May 31, 2016
@dcoutts
Copy link
Contributor

dcoutts commented Jun 1, 2016

So this should now be fixed. Please re-open if you disagree or find other cases of this.

@dcoutts dcoutts closed this as completed Jun 1, 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

5 participants