[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Issues w/ "relink" and cross-compilation
From: |
Philip Prindeville |
Subject: |
Issues w/ "relink" and cross-compilation |
Date: |
Sat, 10 Jul 2010 18:38:28 -0600 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 |
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
- Issues w/ "relink" and cross-compilation,
Philip Prindeville <=