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

Fix linux binary build process #3986

Closed
jgm opened this issue Oct 21, 2017 · 6 comments
Closed

Fix linux binary build process #3986

jgm opened this issue Oct 21, 2017 · 6 comments
Milestone

Comments

@jgm
Copy link
Owner

jgm commented Oct 21, 2017

Since the fully static build isn't working, revert to old build using an older debian image?

@jgm jgm added this to the pandoc 2.0 milestone Oct 21, 2017
@jgm jgm changed the title Fix linux build Fix linux binary build process Oct 21, 2017
@jgm
Copy link
Owner Author

jgm commented Oct 21, 2017

With completely static linking of pandoc, it does not appear possible to load .so lua modules, hence no lpeg. It doesn't look possible to statically compile in dl -- because the dl on the compilation machine may not match what is required on the host machine.

Looks like we need both dynamic linking and the '-Wl,-E' options for it to work.

I had hoped to make the completely static build the linux binary package -- this maximizes portability. But I guess we can't do that if we want lua filters to be able to use lpeg and others.

We could still make the linux package completely static, and tell people who want to use dynamic libraries in their lua filters that they need to build pandoc themselves.

Or we could continue to offer a dynamically linked linux package.

@tarleb
Copy link
Collaborator

tarleb commented Oct 21, 2017

Sorry, I had forgotten about this.

Just providing a fully static binary seems to be the best option, even if it limits the capabilities of the included lua intepreter. We'll need to add a cabal flag for hslua, so '-Wl,-E' can be disabled selectively.

This would offload the responsibility to build a full-featured pandoc binary to the package maintainers of linux distros. Many distros seem to prefer LuaJIT over the default Lua 5.3 anyway. If we find the time, we can still provide custom packages; not going down that rabbit hole right away seems like a sensible trade-off.

@jgm
Copy link
Owner Author

jgm commented Oct 21, 2017 via email

@tarleb
Copy link
Collaborator

tarleb commented Oct 22, 2017

I'm not comfortable deviating too far from the usual lua build parameters, so I added a cabal flag: dynamic symbol exporting can be prevented with hslua-0.9.2 by disabling the export-dynamic flag.

@jgm
Copy link
Owner Author

jgm commented Oct 22, 2017 via email

@jgm
Copy link
Owner Author

jgm commented Oct 23, 2017

OK, we have a fully static build now. Lua filters work, but not if they require .so files.

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