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

Linker failure on macOS in shared library #87

Closed
sternenseemann opened this issue Mar 6, 2022 · 3 comments
Closed

Linker failure on macOS in shared library #87

sternenseemann opened this issue Mar 6, 2022 · 3 comments

Comments

@sternenseemann
Copy link
Contributor

Building the lowdown shared object on macOS will currently fail like this:

clang -shared -o liblowdown.so.1 autolink.o buffer.o diff.o document.o entity.o gemini.o html.o html_escape.o latex.o library.o libdiff.o nroff.o odt.o smartypants.o term.o tree.o util.o compats.o   -Wl,-soname,liblowdown.so.1
ld: unknown option: -soname
clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:168: liblowdown.so] Error 1

This is not surprising, as the lack of a .dylib target already indicates this is not explicitly supported. The question is, do you want to support it upstream? Would you accept patches?

@kristapsdz
Copy link
Owner

Sure, don't hesitate to patch anything you'd like!

@kristapsdz
Copy link
Owner

This has been fixed in recent commits and will appear in the next version. Thank you!

sternenseemann added a commit to sternenseemann/nixpkgs that referenced this issue Apr 30, 2023
Upstream now officially supports darwin and we can drop the workaround
we shipped for <kristapsdz/lowdown#87>.

https://github.com/kristapsdz/lowdown/releases/tag/VERSION_1_0_1
sternenseemann added a commit to sternenseemann/nixpkgs that referenced this issue May 2, 2023
Upstream now officially supports darwin and we can drop the workaround
we shipped for <kristapsdz/lowdown#87>.

https://github.com/kristapsdz/lowdown/releases/tag/VERSION_1_0_1
sternenseemann added a commit to sternenseemann/nixpkgs that referenced this issue May 2, 2023
Upstream now officially supports darwin and we can drop the workaround
we shipped for <kristapsdz/lowdown#87>.

It also creates the symlink from liblowdown.so to the version shared
object for us, but we still need to fix the library extension on darwin.

https://github.com/kristapsdz/lowdown/releases/tag/VERSION_1_0_1
@sternenseemann
Copy link
Contributor Author

Can oconfigure determine the file extension for shared objects somehow? A remaining problem on darwin seems to be that it is still installed as .so and not .dylib. (I also believe the way versioned shared objects are named is different on darwin, but I'd need to look it up.)

sternenseemann added a commit to sternenseemann/nixpkgs that referenced this issue May 3, 2023
Upstream now officially supports darwin and we can drop the workaround
we shipped for <kristapsdz/lowdown#87>.

It also creates the symlink from liblowdown.so to the version shared
object for us, but we still need to fix the library extension on darwin.

https://github.com/kristapsdz/lowdown/releases/tag/VERSION_1_0_1
sternenseemann added a commit to sternenseemann/nixpkgs that referenced this issue May 3, 2023
Upstream now officially supports darwin and we can drop the workaround
we shipped for <kristapsdz/lowdown#87>.

It also creates the symlink from liblowdown.so to the version shared
object for us, but we still need to fix the library extension on darwin.

https://github.com/kristapsdz/lowdown/releases/tag/VERSION_1_0_1
sternenseemann added a commit to NixOS/nixpkgs that referenced this issue May 3, 2023
Upstream now officially supports darwin and we can drop the workaround
we shipped for <kristapsdz/lowdown#87>.

It also creates the symlink from liblowdown.so to the version shared
object for us, but we still need to fix the library extension on darwin.

https://github.com/kristapsdz/lowdown/releases/tag/VERSION_1_0_1
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