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

The Cflags emitted by wasmer config --pkg-config are wrong #1989

Closed
helje5 opened this issue Jan 6, 2021 · 3 comments
Closed

The Cflags emitted by wasmer config --pkg-config are wrong #1989

helje5 opened this issue Jan 6, 2021 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@helje5
Copy link
Contributor

helje5 commented Jan 6, 2021

Describe the bug

When running wasmer config, the -I in the cflags are incorrect. The include path (-I) adds an additional wasmer to the end.

This is on BS macOS ARM, but I suppose it doesn't matter.

helge@M1ni ~ $ wasmer config --pkg-config
prefix=/Users/helge/.wasmer
exec_prefix=/Users/helge/.wasmer/bin
includedir=/Users/helge/.wasmer/include
libdir=/Users/helge/.wasmer/lib

Name: wasmer
Description: The Wasmer library for running WebAssembly
Version: 1.0.0
Cflags: -I/Users/helge/.wasmer/include/wasmer
Libs: -L/Users/helge/.wasmer/lib -lwasmer

Steps to reproduce

  1. run wasmer config --pkg-config

Expected behavior

The cflags should be:

Cflags: -I/Users/helge/.wasmer/include

Actual behavior

The cflags are:

Cflags: -I/Users/helge/.wasmer/include/wasmer

This directory does not exist.

@helje5 helje5 added the bug Something isn't working label Jan 6, 2021
@helje5
Copy link
Contributor Author

helje5 commented Jan 6, 2021

Also: the libs miss the -lffi, which breaks static compiles. Should look like this:

Libs: -L/Users/helge/.wasmer/lib -lwasmer -lffi

@MarkMcCaskey
Copy link
Contributor

I believe -lffi is only required if the libwasmer was built without statically linking libffi. I believe the default and the one we ship should not need -lffi. Are you using the libwasmer in the release or built with custom features?

@helje5
Copy link
Contributor Author

helje5 commented Jan 6, 2021

-lffi is only required with the static lib, correct. It doesn't hurt though in the dynamic variant either.

This is the standard release, I didn't build anything on my own.

There is another issue here w/ M1 Macs, their libffi doesn't have the ffi_type_longdouble function, but the static lib is referring it.

@jubianchi jubianchi self-assigned this Feb 8, 2021
jubianchi added a commit that referenced this issue Feb 8, 2021
exec_prefix=/Users/jubianchi.wasm/.wasmer/bin
includedir=/Users/jubianchi.wasm/.wasmer/include
libdir=/Users/jubianchi.wasm/.wasmer/lib

Name: wasmer
Description: The Wasmer library for running WebAssembly
Version: 1.0.2
Cflags: -I/Users/jubianchi.wasm/.wasmer/include/wasmer
Libs: -L/Users/jubianchi.wasm/.wasmer/lib -lwasmer are now correct

Closes #1989
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants