Building on Fedora (32)

35 views
Skip to first unread message

John Morrison

unread,
Jan 8, 2021, 8:48:24 AM1/8/21
to licensecc users
Hi All, and Happy New Year;

(1) Perhaps this is Pilot Error (mine), but I could not build on Fedora (32), getting link time errors for lccgen, with many errors of the form:

/usr/bin/ld: /usr/lib64/libcrypto.a(c_zlib.o): in function `zlib_stateful_expand_block':
(.text+0x41): undefined reference to `inflate'

Please advise if this is expected (or not).

(2) Presuming it is expected, and licensecc does not, in fact, build on Fedora 32, I changed top-level CMakeLists.txt, and submodule license-generator/CMakeLists.txt, once UNIX is detected, to contain:

execute_process(COMMAND lsb_release -is
  OUTPUT_VARIABLE DISTRO_NAME
  OUTPUT_STRIP_TRAILING_WHITESPACE)
  
execute_process(COMMAND lsb_release -rs
  OUTPUT_VARIABLE DISTRO_NUMBER
  OUTPUT_STRIP_TRAILING_WHITESPACE)
  
to detect distro & release number (numerical, which seems not relevant for the following), & then changed test for "#Zlib required when ..." to:

IF((OPENSSL_VERSION VERSION_LESS_EQUAL 1.0.2) OR (DISTRO_NAME STREQUAL "Fedora"))

This enables building and installing on Fedora 32 (at least), which is by workstation.  Will shortly check on Fedora 30, which I use as a base podman/docker image.

(3) The above is probably not the neatest way to approach platform detection using CMake.  I was particularly impressed with the liberally-licensed Intel "compute-runtime" approach.

(4) I forked licensecc (but not the submodule).  As a relative git novice, please advise whether I should go to the trouble of likewise forking the submodule, figuring out the right git magic to get my own forked submodule from my forked licensecc, and generating a pull request (presumably, two, I guess).

Thank you for the software, and please advise whether and what help I can offer in this regard.

-jm

Reply all
Reply to author
Forward
0 new messages