pkgconfig flag is not usable
felixonmars opened this issue · 0 comments
felixonmars commented
Currently if the pkgconfig flag is enabled, Cabal fails to parse the somewhat strange libcmark-gfm version:
Setup: parsing output of pkg-config --modversion failed
The output of that command is:
$ pkg-config --modversion libcmark-gfm
0.28.3.gfm.14
However, if I change that to a simple link with Extra-Libraries: cmark-gfm cmark-gfmextensions
, the test suite fails to link:
Building test suite 'test-cmark-gfm' for cmark-gfm-0.1.4..
[1 of 1] Compiling Main ( test/test-cmark.hs, dist/build/test-cmark-gfm/test-cmark-gfm-tmp/Main.dyn_o )
Linking dist/build/test-cmark-gfm/test-cmark-gfm ...
/build/haskell-cmark-gfm/src/cmark-gfm-0.1.4/dist/build/libHScmark-gfm-0.1.4-LX6NmMSQV2654l7JqEAgyX-ghc8.4.3.so: error: undefined reference to 'CMARK_DEFAULT_MEM_ALLOCATOR'
collect2: error: ld returned 1 exit status
`gcc' failed in phase `Linker'. (Exit code: 1)
It seems the symbol is not present in the .so file, and can only be found in the source .c files.
Is it possible to make cmark-gfm-hs buildable with system libcmark-gfm?