distr1 / distri

a Linux distribution to research fast package management
https://distr1.org
Other
532 stars 28 forks source link

interactive builds: /ro/include/iconv.h is picked up from libiconv instead of glibc #65

Open stapelberg opened 4 years ago

stapelberg commented 4 years ago

Currently using the following workaround to build i3 from git:

CPATH=/ro/glibc-amd64-2.27-3/out/include:$CPATH make -j8

Need to look into why configure does not detect -liconv, but linking fails without it (unless using the workaround).

stapelberg commented 4 years ago

The glibc include dir is missing from the wrapper script contents because of https://github.com/distr1/distri/blob/54756a65a2846989fc1cd1c1d7c1d3183506a517/cmd/distri/build.go#L734-L745

Maybe we need to look into teaching gcc that /ro/glibc…/out/include is a system directory?

stapelberg commented 4 years ago

Need to look into why configure does not detect -liconv, but linking fails without it (unless using the workaround).

Turns out that autoconf’s AC_SEARCH_LIBS does not put an #include directive into its conftest.c file, so it gets the builtin iconv instead of the one requiring libiconv.

Fixing this in i3’s configure.ac in https://github.com/i3/i3/pull/3942, but of course other upstream software might still use AC_SEARCH_LIBS for detecting iconv.