0

I am trying to cross-compile mc for my arm device with arm-linux-gnueabi toolchain.

at the last step of making mc I get many errors like:

make[3]: Entering directory '/home/jacovlev/utils/mc-4.8.14/src'
/bin/sh ../libtool  --tag=CC   --mode=link arm-linux-gnueabi-gcc -std=gnu99  -Wcomment -Wdeclaration-after-statement -Wfloat-equal -Wformat -Wformat-security -Wimplicit -Wignored-qualifiers -Wmissing-braces -Wmissing-declarations -Wmissing-parameter-type -Wmissing-prototypes -Wnested-externs -Wno-long-long -Wno-unreachable-code -Wparentheses -Wpointer-sign -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtype-limits -Wuninitialized -Wunused-but-set-variable -Wunused-function -Wunused-label -Wunused-parameter -Wunused-result -Wunused-value -Wunused-variable -Wwrite-strings  -I/opt/include  -L/opt/lib -L/opt/lib/libncurses.a -o mc main.o libinternal.la ../lib/libmc.la  -lrt
libtool: link: arm-linux-gnueabi-gcc -std=gnu99 -Wcomment -Wdeclaration-after-statement -Wfloat-equal -Wformat -Wformat-security -Wimplicit -Wignored-qualifiers -Wmissing-braces -Wmissing-declarations -Wmissing-parameter-type -Wmissing-prototypes -Wnested-externs -Wno-long-long -Wno-unreachable-code -Wparentheses -Wpointer-sign -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtype-limits -Wuninitialized -Wunused-but-set-variable -Wunused-function -Wunused-label -Wunused-parameter -Wunused-result -Wunused-value -Wunused-variable -Wwrite-strings -I/opt/include -o mc main.o  -L/opt/lib -L/opt/lib/libncurses.a ./.libs/libinternal.a ../lib/.libs/libmc.a -lncurses -lrt
main.o: In function `OS_Setup':
main.c:(.text+0xe4): undefined reference to `g_strdup'
main.c:(.text+0xfa): undefined reference to `g_strdup'
main.c:(.text+0x13a): undefined reference to `g_free'
main.c:(.text+0x146): undefined reference to `g_strdup'
...

./.libs/libinternal.a(editoptions.o): In function `edit_options_dialog':
editoptions.c:(.text+0x108): undefined reference to `g_snprintf'
editoptions.c:(.text+0x124): undefined reference to `g_snprintf'
editoptions.c:(.text+0x73a): undefined reference to `g_list_foreach'
editoptions.c:(.text+0x772): undefined reference to `g_free'
editoptions.c:(.text+0x7aa): undefined reference to `g_free'
editoptions.c:(.text+0x820): undefined reference to `g_list_foreach'
collect2: ld returned 1 exit status
Makefile:626: recipe for target 'mc' failed

log above I get with make V=1, so you can trace my parameters.

What exactly can cause this errors? What can I do to try to fix them?

As far as I know this are references to Glib.

I'm already tried to remake glib several times with this toolchain (right now I have compiled static glib), and even edited Makefiles by hand to try different parameters, but this gave me nothing.

If it's required I can attach my configure params.

UPDATE: after adding -lglib flag, as William Jones proposed I have different issue now:

/home/jacovlev/voyager_15/toolchain/trunk/bin/../lib/gcc/arm-linux-gnueabi/4.6.3/../../../../arm-linux-gnueabi/bin/ld: cannot find -lglib
Crusader
  • 61
  • 6

0 Answers0