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

Warp fails to install on OpenBSD #428

Closed
cimmanon opened this issue Sep 3, 2015 · 7 comments
Closed

Warp fails to install on OpenBSD #428

cimmanon opened this issue Sep 3, 2015 · 7 comments
Assignees

Comments

@cimmanon
Copy link

cimmanon commented Sep 3, 2015

Adding OpenBSD to the list of operating systems that should include Hashable in the cabal file doesn't work because OpenBSD does not have sendfile().

Downloading warp-3.1.3...
Configuring warp-3.1.3...
Building warp-3.1.3...
Preprocessing library warp-3.1.3...

Network/Wai/Handler/Warp/FdCache.hs:29:8:
    Could not find module `Data.Hashable'
    It is a member of the hidden package `hashable-1.2.3.3'.
    Perhaps you need to add `hashable' to the build-depends in your .cabal file.
    It is a member of the hidden package `hashable-1.2.2.0'.
    Perhaps you need to add `hashable' to the build-depends in your .cabal file.
    Use -v to see a list of the files searched for.
Failed to install warp-3.1.3
@awpr
Copy link
Member

awpr commented Sep 3, 2015

Does it work if you add "-f -allow-sendfilefd" to the cabal command-line? That should force it not to use sendfile() even when it thinks it's on an OS that supports it.

@cimmanon
Copy link
Author

cimmanon commented Sep 3, 2015

No, that doesn't change anything.

@awpr
Copy link
Member

awpr commented Sep 3, 2015

Ah, FdCache.hs imports it unconditionally, so you'd need to add hashable to the build-depends (outside the part that's conditional on allow-sendfilefd) -- what you did before was presumably adding it to the whitelist of OSes that support sendfile. For a real fix, we should probably move the hashable build-depends entry to everything but Windows (since the whole file is stubbed out to be a no-op on Windows).

@cimmanon
Copy link
Author

cimmanon commented Sep 3, 2015

Yes, adding hashable to the build-depends outside the conditional lets it install, but the resulting library can't be used. I don't know if this linking problem is related or a separate issue.

 Loading package warp-3.1.3 ... linking ... ghc: /home/adam/servanttest/.cabal-sandbox/lib/x86_64-openbsd-ghc-7.8.4/warp-3.1.3/libHSwarp-3.1.3.a: unknown symbol `warpzm3zi1zi3_NetworkziWaiziHandlerziWarpziMultiMap_Tom_con_info'
ghc: unable to load package `warp-3.1.3'
Failed to install wai-app-static-3.1.1

@awpr
Copy link
Member

awpr commented Sep 3, 2015

Oh, the cabal file gives a hint there: it builds MultiMap only if we're using sendfile, but FdCache also uses MultiMap. Try moving the MultiMap "Other-modules" line to the same place as the hashable dependency.

@kazu-yamamoto
Copy link
Contributor

I hope the patch above solves the problem.

@kazu-yamamoto
Copy link
Contributor

I would like to close this. Please reopen if necessary.

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

4 participants