Hi Daiki, Am 19.02.2015 um 05:02 schrieb Daiki Ueno <[email protected]>: > Dagobert Michelsen <[email protected]> writes: >> FAIL: lang-vala >> =============== >> >> ld.so.1: prog: fatal: libintl.so.8: open failed: No such file or directory >> ./lang-vala: line 90: 29632 Killed LANGUAGE= >> LC_ALL=$LOCALE_FR ./prog > prog.out >> FAIL lang-vala (exit status: 1) > > Vala is basically a C translator and it takes compiler/linker flags from > pkgconfig. So I suspect your glib-2.0.pc does not point to the correct > location of the system's libintl library. You could try adding > --verbose to ${VALAC} command line in lang-vala to get the actual linker > command line (maybe we should add it by default for better diagnostics).
I finally managed to isolate the issue. Here is my testcase:
prog.vala:
int main (string[] args) {
Intl.setlocale (LocaleCategory.ALL, "");
Intl.textdomain ("prog");
Intl.bindtextdomain ("prog", ".");
stdout.printf ("%s\n", _("'Your command, please?', asked the waiter."));
stdout.printf ("%s\n", _("%s is replaced by %s.").printf ("FF", "EUR"));
return 0;
}
Works:
PATH=/usr/bin:/opt/csw/bin truss -o valac.truss -f valac
'--Xcc=-DGETTEXT_PACKAGE="prog"‘ prog.vala
Does not work:
PATH=/opt/csw/bin:/usr/bin truss -o valac.truss -f valac
'--Xcc=-DGETTEXT_PACKAGE="prog"' prog.vala
When I use
PATH=/opt/csw/bin:/usr/bin
then pkg-config from OpenCSW takes precedence and glib-2.0.pc is taken from
OpenCSW which requires libintl.so.8 and marks it as NEEDED in the resulting
binary.
When the binary is run the RUNPATH is not correctly set to include
-R/opt/csw/lib
as it is usually passed via -R to LD_OPTIONS and implicitly pulled in and not
registered in the pc-file.
Adding LD_OPTIONS=-R/opt/csw/lib to the invocation of the testsuite makes
the tests passing.
I do pass LDFLAGS=-R/opt/csw/lib during configure-time but that doesn’t seem to
be
sufficient. Is this intended or should the tests take LDFLAGS into account?
Best regards
— Dago
--
"You don't become great by trying to be great, you become great by wanting to
do something,
and then doing it so hard that you become great in the process." - xkcd #896
smime.p7s
Description: S/MIME cryptographic signature
