adrian-thurston / colm

The Colm Programming Language
MIT License
164 stars 31 forks source link

Building colm dies looking for libcolm.a #146

Closed Jancs-E closed 2 years ago

Jancs-E commented 2 years ago

BUilding colm 0.14.7 dies with following error

Making all in colm.d
make[2]: Entering directory '/tmp/SBo/colm-0.14.7/test/colm.d'
sedsubst: generating gentests from gentests.sh
make[2]: Leaving directory '/tmp/SBo/colm-0.14.7/test/colm.d'
Making all in rlhc.d
make[2]: Entering directory '/tmp/SBo/colm-0.14.7/test/rlhc.d'
../../src/colm -b rlhc_object -o rlhc rlhc.lm
/usr/bin/ld: cannot find /tmp/SBo/colm-0.14.7/src/.libs/libcolm.a: No such file or directory
collect2: error: ld returned 1 exit status
error: colm: there was a problem compiling the output

such file does not exist in the build tree

adrian-thurston commented 2 years ago

Hi @Jancs-E , what were the configure and make commands you used?

belka-ew commented 2 years ago
CFLAGS="-O2 -fPIC" \
CXXFLAGS="-O2 -fPIC" \
./configure \
  --prefix=/usr \
  --libdir=/usr/lib64 \
  --sysconfdir=/etc \
  --localstatedir=/var \
  --mandir=/usr/man \
  --docdir=/usr/doc/colm-0.14.7 \
  --disable-static \
  --build=x86_64-slackware-linux

This happens because of --disable-static. It builds fine without --disable-static. But then the final installation contains usr/lib64/libcolm-0.14.7.so, usr/lib64/libcolm.a, usr/lib64/libfsm-0.14.7.so and usr/lib64/libfsm.a. Shared libraries are nromally enough for linking, would be nice to make it possible to skip the static libraries.

adrian-thurston commented 2 years ago

Hi @Jancs-E this is fixed in fc61ecb3a22b89864916ec538eaf04840e7dd6b5.