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

Comments

Projects
None yet
4 participants
@cimmanon
Copy link

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

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Author

commented Sep 3, 2015

No, that doesn't change anything.

@awpr

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link
Member

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 added a commit that referenced this issue Sep 15, 2015

@kazu-yamamoto

This comment has been minimized.

Copy link
Contributor

commented Sep 15, 2015

I hope the patch above solves the problem.

@kazu-yamamoto kazu-yamamoto self-assigned this Sep 15, 2015

@kazu-yamamoto

This comment has been minimized.

Copy link
Contributor

commented Sep 29, 2015

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
You can’t perform that action at this time.