I'm the lead developer and distro manager for astlinux. It's an
embedded run-from-flash distro, so everything is cross-compiled by
necessity.
The problem is that a lot of projects that we use in turn use libtool
(and not always terribly up-to-date versions of it), and what seems to
happen is that the relink stage uses -L/usr/lib by default, even when
cross-compiling.
libtool: relink:
/home/philipp/kernel/build_i586/staging_dir/bin/i586-linux-uclibc-gcc -shared
.libs/agent_handler.o .libs/agent_index.o .libs/agent_read_config.o
.libs/agent_registry.o .libs/agent_sysORTable.o .libs/agent_trap.o
.libs/kernel.o .libs/snmp_agent.o .libs/snmp_vars.o mibgroup/smux/.libs/smux.o
mibgroup/mibII/.libs/vacm_conf.o mibgroup/snmpv3/.libs/usmConf.o
helpers/.libs/all_helpers.o helpers/.libs/baby_steps.o
helpers/.libs/bulk_to_next.o helpers/.libs/cache_handler.o
helpers/.libs/debug_handler.o helpers/.libs/instance.o
helpers/.libs/mode_end_call.o helpers/.libs/multiplexer.o helpers/.libs/null.o
helpers/.libs/old_api.o helpers/.libs/read_only.o helpers/.libs/row_merge.o
helpers/.libs/scalar.o helpers/.libs/scalar_group.o helpers/.libs/serialize.o
helpers/.libs/snmp_get_statistic.o helpers/.libs/stash_cache.o
helpers/.libs/stash_to_next.o helpers/.libs/table.o helpers/.libs/table_array.o
helpers/.libs/table_container.o helpers/.libs/table_data.o
helpers/.libs/table_dataset.o helpers/.libs/table_iterator.o
helpers/.libs/table_row.o helpers/.libs/table_tdata.o helpers/.libs/watcher.o
-L/home/philipp/kernel/build_i586/staging_dir/usr/lib -L/usr/lib -lnetsnmp
-L/home/philipp/kernel/build_i586/staging_dir/lib -lcrypto -march=k6-2
-isysroot /home/philipp/kernel/build_i586/staging_dir -Wl,-soname
-Wl,libnetsnmpagent.so.25 -o .libs/libnetsnmpagent.so.25.0.0
note the -L/usr/lib which is dead-wrong.
There's probably a really simple trick to getting this not to happen, but it's
not obvious to me. Also, it would be nice if libtool figured out the need to
do this on its own (i.e. figure out that it's cross-compiling and that -Lxxx
for any host libraries shouldn't be included).
Can someone walk me through the workaround?
We've had this issues with libusb-1.0 and netsnmp that have stopped us from
bumping versions... not having a solution here is a gating factor for us.
Thanks,
-Philip
_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool