DaemonForums  

Go Back   DaemonForums > NetBSD > NetBSD General

NetBSD General Other questions regarding NetBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 19th September 2020
jmccue jmccue is offline
Real Name: John McCue
Package Pilot
 
Join Date: Aug 2012
Location: here
Posts: 167
Default New Shared Lib on i386

Hi,

NetBSD i386 9.0 (GENERIC) #0: Fri Feb 14 00:06:28 UTC 2020

I have my own personal shared library, which complies and installs fine. When I compile programs that link against that library, the compile succeeds.

But when I attempt to run one of the programs I get:

Quote:
/usr/local/lib/libj_lib.so: text relocations
/usr/local/lib/libj_lib.so: Cannot write-enable text segment: Permission denied
I even tried a reboot without luck.

I did many searches but all I found was issues compiling mplayer and to use ld.so.conf, but nothing else. I read ld.so.conf is no longer needed and man pages has nothing I can find.

Does anyone know what I can do to fix this issue ?

edit: no luck with "-Wl,-R/usr/local/lib" as noted in the elf FAQ

Thanks
John

Last edited by jmccue; 19th September 2020 at 10:06 PM. Reason: added more info
Reply With Quote
  #2   (View Single Post)  
Old 19th September 2020
jmccue jmccue is offline
Real Name: John McCue
Package Pilot
 
Join Date: Aug 2012
Location: here
Posts: 167
Default SOLVED -- found the issue

After posting I continued to look.

In the past, creating a Shared Lib on NetBSD i386. I did not need to specify "-fpic -DPIC".

On 9.0, I build the lib on i386 and specific "-fpic -DPIC", no issues
Reply With Quote
Reply

Tags
shared lib ldconfig

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
chroot MacOSX and put net into BSD shared Kernel? Ioknod FreeBSD Installation and Upgrading 1 6th April 2016 03:56 PM
chroot MacOSX and put net into BSD shared Kernel? Ioknod FreeBSD General 0 6th April 2016 03:20 PM
chroot MacOSX and put net into BSD shared Kernel? Ioknod FreeBSD Security 0 5th April 2016 07:10 PM
I386 ELF32 binary on AMD64 system can't find shared libraries Gemini FreeBSD General 0 9th December 2008 06:49 AM
shared libraries and linux emulation Business_woman FreeBSD General 4 16th November 2008 10:03 AM


All times are GMT. The time now is 08:25 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick