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

Link error when attempting to run tests with Stackage #459

Closed
ghost opened this issue Aug 27, 2015 · 7 comments
Closed

Link error when attempting to run tests with Stackage #459

ghost opened this issue Aug 27, 2015 · 7 comments

Comments

@ghost
Copy link

ghost commented Aug 27, 2015

Attempting to do a Stackage configuration, when I run stack test, I get:

/home/scshunt/code/haskell/persistent/persistent-test/.stack-work/dist/x86_64-linux/Cabal-1.18.1.5/build/libHSpersistent-test-2.0.0.a(Sqlite.o): In function `r30O0_info':
/tmp/ghc5695_0/ghc_114.o:(.text+0x1cc39): undefined reference to `persistent_sqlite_set_log'

I do not know what is up, and I haven't yet set up a cabal sandbox to test if this is a general issue or exclusive to using stack to test.

@gregwebs
Copy link
Member

@snoyberg will be interested in this. In general there are some land mines with sqlite linking with cabal or stack. You can build with postgres or mongoDB if you don't want to have any native dependencies

@snoyberg
Copy link
Member

I'm already trying to repro ;)

snoyberg added a commit that referenced this issue Aug 27, 2015
@snoyberg
Copy link
Member

I reproed the problem and fixed it by adding a missing c-sources to the test suite. However, I have no idea why Travis didn't catch this. I'll try to repro with cabal in the morning.

@ghost
Copy link
Author

ghost commented Aug 27, 2015

Thanks! Don't want to open a new issue in case I'm doing something stupid or it's related, but it now stops during the SQLite tests:

    test: SQLite3 returned ErrorError while attempting to perform prepare "CREATE TABLE \"foo\"(\"name\" VARCHAR NOT NULL, PRIMARY KEY (\"name\"))": table "foo" already exists

@snoyberg
Copy link
Member

The problem on Travis is indeed that it was not building or running the sqlite versions of the tests, which is why this went undiscovered. Adding the missing c-sources is in fact the correct fix.

@scshunt That problem now appears on Travis as well, I'll look into solving it next.

@snoyberg
Copy link
Member

OK, I think I've fixed that name collision now, give it a shot.

@gregwebs
Copy link
Member

closing for now. please re-open if the issue still exists

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

No branches or pull requests

2 participants