BSD Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsBSD Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old April 29th, 2005, 11:57 AM
BenZarboni BenZarboni is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 104 BenZarboni User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 5 h 41 m 29 sec
Reputation Power: 5
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

Reply With Quote
  #2  
Old April 29th, 2005, 12:23 PM
jharnois's Avatar
jharnois jharnois is offline
mod_dev_shed
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Sep 2002
Location: Atlanta, GA
Posts: 14,299 jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 1 Week 2 Days 1 h 54 m 17 sec
Reputation Power: 760
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.

Reply With Quote
  #3  
Old April 29th, 2005, 02:19 PM
BenZarboni BenZarboni is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 104 BenZarboni User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 5 h 41 m 29 sec
Reputation Power: 5
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

Reply With Quote
  #4  
Old April 29th, 2005, 02:23 PM
jharnois's Avatar
jharnois jharnois is offline
mod_dev_shed
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Sep 2002
Location: Atlanta, GA
Posts: 14,299 jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 1 Week 2 Days 1 h 54 m 17 sec
Reputation Power: 760
There should be a way to specify directories when you ./configure. Try ./configure --help and see what options you have.

Reply With Quote
  #5  
Old April 29th, 2005, 03:32 PM
Scorpions4ever's Avatar
Scorpions4ever Scorpions4ever is online now
Banned ;)
Dev Shed God 5th Plane (7000 - 7499 posts)
 
Join Date: Nov 2001
Location: Glendale, Los Angeles County, California, USA
Posts: 7,442 Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 1 h 22 m 8 sec
Reputation Power: 797
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

Reply With Quote
  #6  
Old May 2nd, 2005, 05:10 PM
BenZarboni BenZarboni is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 104 BenZarboni User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 5 h 41 m 29 sec
Reputation Power: 5
Quote:
Originally Posted by Scorpions4ever
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.


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.

Reply With Quote
  #7  
Old May 5th, 2005, 10:51 AM
BenZarboni BenZarboni is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 104 BenZarboni User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 5 h 41 m 29 sec
Reputation Power: 5
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsBSD Help > Compiling for another system - question


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway