|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Compiling for another system - question
Hey guys;
I've got a package that I want to compile on my development box (FreeBSD5.3) which is supposed to run on an embedded platform running FreeBSD4.9. When I build the program, its looking for ld-elf.so.1 under /libexec (which is where it is on my machine) but its under /usr/libexec on the embedded target. Is there a way I can build it so that when I put it on the embedded system, it looks for ld-elf.so.1 in /usr/libexec? A linker option? Can it be done? As you can tell I have a load of experience in this area ![]() Thanks! Ben Z |
|
#2
|
||||
|
||||
|
It's been a while since I've been on a FreeBSD machine, and I've never done what you're wanting to do, so keep that in mind.
Would it be possible to create a sym link on the embedded box that points /libexec to /usr/libexec? Are you compiling via pkg_add and such or "by hand"?
__________________
# Jeremy Explain your problem instead of asking how to do what you decided was the solution. |
|
#3
|
|||
|
|||
|
I'm trying to compile by hand.
I hadn't even thought of making a link :P Thanks. The only other problem its caused now is that I think I have to statically link a couple of missing libraries into the module.. Is there a way to tell the linker to do that? BZ |
|
#4
|
||||
|
||||
|
There should be a way to specify directories when you ./configure. Try ./configure --help and see what options you have.
|
|
#5
|
||||
|
||||
|
WTF? I don't see a problem here. The .so file is a shared object (i.e.) a dynamically linked library. The loader looks in the standard directories for it. /libexec and /usr/libexec should both be in the list of standard directories. You can also change the list of searched directories using ldconfig, or editing the LD_LIBRARY_PATH shell variable.
__________________
Up the Irons What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home. "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest Down with Sharon Osbourne Puzzle of the Month solved by sizeablegrin, etienne141 and L7Sqr, superior C/C++ programmers of the month |
|
#6
|
|||
|
|||
|
Quote:
Is there any way to specify during compilation which version of a shared library it should link against at runtime? I'm building on 5.3 and it has a newer version of libm than my 4.9 environment. Even though I am telling autoconf to build for 4.9, the program is still trying to link against the wrong version of libm. |
|
#7
|
|||
|
|||
|
Is it true that you can't backwards compile? I was explaining the situation to a friend, and he tells me that you can't compile for 4.9 from a 5.3 system.
|
![]() |
| Viewing: Dev Shed Forums > Operating Systems > BSD Help > Compiling for another system - question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|