Closed ole closed 6 years ago
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 make
:
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, libdir
in the pkgconfig file is /usr/local/
where I'd expect /usr/local/lib
. I admit I don't know a lot about pkgconfig, but that's wrong, isn't it?
+++ Ole Begemann [Oct 08 17 10:36 ]:
[1]@jgm 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 git@github.com: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 make
(now corrected in my post above).
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, @CMAKE_INSTALL_LIBDIR@
(used in libcmark.pc.in
) is blank on my machine.
The hardcoded lib
directory was replaced by @CMAKE_INSTALL_LIBDIR@
in #185.
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 build/CMakeCache.txt
file does list the value of CMAKE_INSTALL_LIBDIR
as lib
:
> cat build/CMakeCache.txt | grep -n -C 1 CMAKE_INSTALL_LIBDIR
110-//Object code libraries (lib)
111:CMAKE_INSTALL_LIBDIR:PATH=lib
112-
--
--
363-CMAKE_INSTALL_INFODIR-ADVANCED:INTERNAL=1
364://ADVANCED property for variable: CMAKE_INSTALL_LIBDIR
365:CMAKE_INSTALL_LIBDIR-ADVANCED:INTERNAL=1
366-//ADVANCED property for variable: CMAKE_INSTALL_LIBEXECDIR
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 https://github.com/commonmark/cmark/pull/240
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
):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: