-
-
Notifications
You must be signed in to change notification settings - Fork 552
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
macOS: pkgconfig contains wrong libdir #236
Comments
This isn't the right place. You might try https://github.com/Homebrew/brew
and see if it says there how to report such bugs.
|
@jgm Well, Homebrew says the right place is to "open an issue on the formula's repository", which is what led me here. Having said that, I don't think anymore that this is a Homebrew issue (I'm going to edit the title of this issue accordingly). I just built cmark from source and I'm seeing the same problem: > cmake --version
cmake version 3.9.4
CMake suite maintained and supported by Kitware (kitware.com/cmake).
> git clone git@github.com:commonmark/cmark.git Edit: I omitted the next two commands I typed when I first posted this: > cd cmark
> make Continuing with the results of mkdir -p build; \
cd build; \
cmake .. \
-G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE= \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
-- The C compiler identification is AppleClang 9.0.0.9000037
-- The CXX compiler identification is AppleClang 9.0.0.9000037
...
[100%] Built target libcmark_static
Binaries can be found in build/src
> cat build/src/libcmark.pc
prefix=/usr/local
exec_prefix=/usr/local
libdir=/usr/local/
includedir=/usr/local/include
Name: libcmark
Description: CommonMark parsing, rendering, and manipulation
Version: 0.28.0
Libs: -L${libdir} -lcmark
Cflags: -I${includedir} Again, |
+++ Ole Begemann [Oct 08 17 10:36 ]:
***@***.*** Well, [2]Homebrew says the right place is to "open an issue on
the formula's repository", which is what led me here.
I think they mean the homebrew formula for cmark, not the
cmark upstream repository. I don't know where the homebrew
formula for cmark is maintained, but that's what you need
to look for.
I just built cmark from source and I'm seeing the same problem:
> cmake --version
cmake version 3.9.4
CMake suite maintained and supported by Kitware (kitware.com/cmake).
> git clone ***@***.***:commonmark/cmark.git
mkdir -p build; \
cd build; \
cmake .. \
-G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE= \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
-- The C compiler identification is AppleClang 9.0.0.9000037
-- The CXX compiler identification is AppleClang 9.0.0.9000037
...
[100%] Built target libcmark_static
Binaries can be found in build/src
> cat build/src/libcmark.pc
prefix=/usr/local
exec_prefix=/usr/local
libdir=/usr/local/
includedir=/usr/local/include
Strange. Here's what I see when I build from source on OSX
with default options:
prefix=/usr/local
exec_prefix=/usr/local
libdir=/usr/local/lib
includedir=/usr/local/include
Maybe it has something to do with the custom CMAKE options
you're passing in?
|
First of all, I made a copy-and-paste mistake above (apologies!) that may have made it seem like I passed some custom CMake options, but if I did I'm not aware of it. I just called I don't know anything about CMake, so it's hard for me to debug this, but it seems pretty clear that for whatever reason, The hardcoded I have no idea why this would be the case or what I may have done to misconfigure my system. As far as I know I'm using a stock CMake (v 3.9.4), installed via Homebrew. The fact that the prebuilt binaries distributed by Homebrew (whoever maintains them) seem to have the same issue at least suggests I'm not alone. |
Don't know if this helps, but my
|
Sorry! I wasn't using the latest code. I can now see the
same behavior on my machine, now that I've pulled in that
patch.
Let's check with the author of that patch about how
CMAKE_INSTALL_LIBDIR is supposed to be set. I had assumed
that it would be set automatically to lib by default...
|
OK, this is weird. If I just do 'touch src/libcmark.pc.in'
and then 'make' again, I get the right path in
build/src/libcmark.pc.
|
@jgm Thanks! |
CMAKE_INSTALL_LIBDIR being blank is probably caused by #240 |
For some reason this wasn't getting set in processing libcmark.pc.in, and we were getting the wrong entry in libcmark.pc. (See #236) The new approach sets an internal libdir variable to lib${LIB_SUFFIX}. This variable is used both to set the install destination and in the libcmark.pc.in template. Closes #236. However, I'd welcome comments from @juhp who originally added CMAKE_INSTALL_LIBDIR in #185. I think that the new system should work fine with Fedora, since LIB_SUFFIX will be set appropriately, but some testing is in order.
Is this the right place to report issues with the cmark formula for Homebrew? If not, my apologies. Could somebody direct me to the proper place? Thanks!
I installed cmark 0.28.0 on macOS 10.13 High Sierra (build 17A362a, i.e. the GM; the final release has build number 17A365, but I hope that's not relevant to this issue):
This is the pkgconfig file that I get:
If I'm not mistaken,
libdir
is wrong; it should be/usr/local/Cellar/cmark/0.28.0/lib
, i.e. it's missing the finallib
subdirectory.As a result, pkgconfig returns the wrong thing for
-L
(libcmark.dylib
is atcmark/0.28.0/lib
, notcmark/0.28.0
):> pkg-config libcmark --libs --cflags -I/usr/local/Cellar/cmark/0.28.0/include -L/usr/local/Cellar/cmark/0.28.0/ -lcmark
I don't think this issue is specific to macOS High Sierra. I downloaded the bottles for the older OSes manually (Sierra, El Capitan, Yosemite), and their
libcmark.pc
files look the same.Building from source doesn't fix the issue, either:
The text was updated successfully, but these errors were encountered: