dslm4515 / BMLFS

Beyond Musl Linux From Scratch - Build Recipes for MLFS [Musl Linux From Source]
17 stars 4 forks source link

Geany not supported by gettext-tiny #10

Closed dslm4515 closed 3 years ago

dslm4515 commented 4 years ago

Compiling under a system that uses gettext-tiny instead of GNU's gettext, cause geany to not link during build:

make[3]: Entering directory '/home/sysdev/geany-1.37/src'
  CXXLD    libgeany.la
libtool:   error: cannot find the library '/usr/lib/libintl.la' or unhandled arg
ument '/usr/lib/libintl.la'
make[3]: *** [Makefile:801: libgeany.la] Error 1
make[3]: Leaving directory '/home/sysdev/geany-1.37/src'
make[2]: *** [Makefile:1268: all-recursive] Error 1
make[2]: Leaving directory '/home/sysdev/geany-1.37/src'
make[1]: *** [Makefile:598: all-recursive] Error 1
make[1]: Leaving directory '/home/sysdev/geany-1.37'
make: *** [Makefile:482: all] Error 2

Gettext-tiny installs /usr/lib/libintl.a instead of libintl.so or libintl.la

dslm4515 commented 4 years ago

Unpacked the gettext-tiny source to create the missing shared library:

cd  libintl
gcc -Wall -g -shared -o libintl.so -fPIC libintl-musl.c
sudo cp -v libintl.so /usr/lib/libintl.so.0.3.1
sudo ln -sv libintl.so.0.3.1 /usr/lib/libintl.so.8

Looks like errors still remains, but if I install a version of geany that was built under a system that uses GNU's gettext, geany loads fine.

Seems like a system that uses gettext-tiny, /usr/lib/libintl.la is expected but not provided by gettext-tiny

dslm4515 commented 4 years ago

Attempted to manually rebuild libintl.a with libtool:

# First unpack gettext-tiny source.
cd libtintl
libtool --tag=CC --mode=compile  gcc -g -O2 -Wall  -c libintl-musl.c
libtool --tag=CC --mode=link   gcc -g -O2 -Wall  -o libintl.la
# Copy
sudo cp -v  .libs/libintl.a /usr/lib
sudo cp -v  libintl.la /usr/lib

Modified libintl.la to have this:

# Version information for libintl.
current=0
age=3
revision=1

# Is this an already installed library?
installed=yes

# Directory that this library needs to be installed in:
libdir='/usr/lib'

Seems like error is gone. Of course, packages installed were from a previous MLFS built with GNU's gettext. Not sure if error would have been avoided if packages were compiled under a host with gettext-tiny instead of GNU's Gettext.

dslm4515 commented 3 years ago

Rebuilding a MLFS build with vanilla gettext-tiny to see if issue was caused by gettext-tiny or a mix-up of some packages built with GNU's gettext instead

dslm4515 commented 3 years ago

Built toolchain with gettext-mini. Built MLFS with gettext-tiny via same toolchain. Built all dependencies of geany with gettext-mini. Geany now builds fine.

In short, don’t mix packages built with GNU’s Gettext.