Alexander Kabaev | 1 Dec 2007 02:01
Picon

Re: dlopen: resolving external library symbols to calling program

On Fri, 30 Nov 2007 22:19:48 +0200
Kostik Belousov <kostikbel <at> gmail.com> wrote:

> On Fri, Nov 30, 2007 at 04:40:33PM -0300, Alejandro Pulver wrote:
> > On Fri, 30 Nov 2007 19:02:01 +0200
> > Kostik Belousov <kostikbel <at> gmail.com> wrote:
> > 
> > > On Fri, Nov 30, 2007 at 01:28:58PM -0300, Alejandro Pulver wrote:
> > > > Hello.
> > > > 
> > > > When I was updating the games/deng port, I found it failed at
> > > > runtime with the following error:
> > > > 
> > > > % doomsday
> > > > While opening dynamic library
> > > > /usr/local/lib/libdropengl.so:
> > > >   /usr/local/lib/libdropengl.so: Undefined symbol "ArgExists"
> > > > DD_InitDGL: Loading of libdropengl.so failed.
> > > >   (null).
> > > > 
> > > > The function is defined in m_args.c which is included in both
> > > > "doomsday" and "libdropengl.so". But nm(1) reports it as
> > > > undefined for "libdropengl.so". Also, it is loaded with
> > > > RTLD_NOW.
> > > > 
> > > > % nm `which doomsday` | grep ArgExists
> > > > 080d9ef0 T ArgExists
> > > You are looking at the wrong symbol table. ELF objects have the
> > > dynamic symbol table that is used during run-time linking, and
> > > symbol table used by the static linker ld. The former table is
(Continue reading)

Yuri | 1 Dec 2007 01:49

Linux executable picks up FreeBSD library over linux one and breaks

I am trying to run Linux version of Skype and am getting the following error:
/usr/home/yuri/skype/current/skype: error while loading shared libraries:
/usr/lib/librt.so.1: ELF file OS ABI 

File /usr/lib/librt.so.1 is FreeBSD library and
/usr/compat/linux/lib/librt.so.1 is Linux library with the same name
installed by linux_base-fc-4_10.

My LD_LIBRARY_PATH is set to /usr/compat/linux/lib:/usr/compat/linux/usr/lib.

Why FreeBSD version is being picked up even though it's not
in LD_LIBRARY_PATH?

Yuri
_______________________________________________
freebsd-hackers <at> freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe <at> freebsd.org"

Sdävtaker | 1 Dec 2007 02:43
Picon

Looking for syscalls documentation pointers.

Hello.
I was wondering if there is any place where i can get the
specifications used to write the syscalls.
I was reading the syscalls.master and it only says the number and name
of the syscall, and only few are documented at man.
Any idea who could have that kind of documentation?
As example, what determines the permitions of a just created file?
(From experiments i got they 000) :-/
I guess if there is no doc, i will have just to read the whole code :-(
Thanks for any help.
Sdav
_______________________________________________
freebsd-hackers <at> freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe <at> freebsd.org"

Alexander Leidinger | 1 Dec 2007 16:29
Favicon

Re: Linux executable picks up FreeBSD library over linux one and breaks

Quoting Yuri <yuri <at> rawbw.com> (Fri, 30 Nov 2007 16:49:03 -0800):

This is better suited in emulation <at> 

> I am trying to run Linux version of Skype and am getting the following error:
> /usr/home/yuri/skype/current/skype: error while loading shared libraries:
> /usr/lib/librt.so.1: ELF file OS ABI 
> 
> File /usr/lib/librt.so.1 is FreeBSD library and
> /usr/compat/linux/lib/librt.so.1 is Linux library with the same name
> installed by linux_base-fc-4_10.
> 
> My LD_LIBRARY_PATH is set to /usr/compat/linux/lib:/usr/compat/linux/usr/lib.

The recommendation is to _not_ set the LD_LIBRARY_PATH.

> Why FreeBSD version is being picked up even though it's not
> in LD_LIBRARY_PATH?

Have a look at the search order of libs in linux. Correlate this with
the fact that when in linux an access is done to e.g. /lib/libX.so.y
which means that the linuxulator first looks
if /compat/linux/lib/libX.so.y is there, and if it isn't it looks
if /lib/libX.so.y is available.

AFAIR a work around is to add a link
in /compat/linux/usr/lib/librt.so.1 -> /lib/librt.so.1

I want to do something like this in the FC4 port, but hadn't time to do
it and test it so far.
(Continue reading)

Greg Troxel | 1 Dec 2007 17:11
Picon

Re: Linux executable picks up FreeBSD library over linux one and breaks

I had a Linux shared library problem on NetBSD that I think it might be
helpful to mention.

thunderbird (and firefox) set LD_LIBRARY_PATH to pick up their own
modules.  When acroread is invoked to display a pdf attachment,
LD_LIBRARY_PATH is still set, and this causes acroread to read a BSD
library.  My workaround is to use a script for acroread that cleans the
environment.

I think this is a thunderbird bug; the environment of invoked programs
should match the environment as of thunderbird's invocation.

_______________________________________________
freebsd-emulation <at> freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-emulation
To unsubscribe, send any mail to "freebsd-emulation-unsubscribe <at> freebsd.org"

Andy Rozman | 1 Dec 2007 17:44

freebsd network problem and restarts

Hi !

Lately after install of new hardware, I upgraded to FreeBSD 7.0 AMD64. 
Problem is that every few days (5 or so) computer network connection is 
lost, if I restart computer everything is OK again....

What I need is script that will determine if connection is valid and if 
not restarting the machine. I plan to run this script by cron every 
hour... I am very lousy with writing scripts of anykind, so I would need 
little help from you...

Script must do following things:
1. Check if connection is alive by pinging one site, www.google.com 
should be good example
2a) If connection is ok, script is finished
2b) There is no response following stuff must happen:
         a.) Wait for 10 minutes (or some specified time) and try step 1 
again if fails following thing are done
         b.) Write line into log that connection is failed
         c.) Inject mail message to local sendmail instance (so that 
mail is sent after restart)
         d.) Reboot computer

If someone knows about script that does this things, I would be very 
thankful if he/she could help me. If not I would be thankful for any 
help in creating such script.

Thank you in advance.
Andy
_______________________________________________
(Continue reading)

Mike Meyer | 1 Dec 2007 18:51

Re: Linux executable picks up FreeBSD library over linux one and breaks

On Sat, 01 Dec 2007 11:11:39 -0500 Greg Troxel <gdt <at> ir.bbn.com> wrote:
> I had a Linux shared library problem on NetBSD that I think it might be
> helpful to mention.

And I have pretty much the exact same bug in OSX.

> thunderbird (and firefox) set LD_LIBRARY_PATH to pick up their own
> modules.  When acroread is invoked to display a pdf attachment,
> LD_LIBRARY_PATH is still set, and this causes acroread to read a BSD
> library.  My workaround is to use a script for acroread that cleans the
> environment.

s/thunderbird/claws-mail/
s/acroread/dillo/

In my case, the problme isn't emulation-related; it's that claws-mail
uses a different version of some library than the system has. Dillo
uses it anyway, then fails to find the features that were there when
it was built, and exits.

> I think this is a thunderbird bug; the environment of invoked programs
> should match the environment as of thunderbird's invocation.

In general, yes. But in these cases, smarter library resolution (or
maybe it's to smart) could also solve the problem.

      <mike
--

-- 
Mike Meyer <mwm <at> mired.org>		http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.
(Continue reading)

Dag-Erling Smørgrav | 1 Dec 2007 19:46
Picon
Gravatar

Re: Looking for syscalls documentation pointers.

Sdävtaker <sdavtaker <at> gmail.com> writes:
> I was reading the syscalls.master and it only says the number and name
> of the syscall, and only few are documented at man.

Look harder.  Almost all FreeBSD system calls have a man page.

> Any idea who could have that kind of documentation?
> As example, what determines the permitions of a just created file?

The second argument to creat(2) or the third argument to open(2).

DES
--

-- 
Dag-Erling Smørgrav - des <at> des.no
_______________________________________________
freebsd-hackers <at> freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe <at> freebsd.org"

Robert Watson | 2 Dec 2007 00:01
Picon
Favicon

Re: Linux executable picks up FreeBSD library over linux one and breaks


On Sat, 1 Dec 2007, Alexander Leidinger wrote:

> Have a look at the search order of libs in linux. Correlate this with the 
> fact that when in linux an access is done to e.g. /lib/libX.so.y which means 
> that the linuxulator first looks if /compat/linux/lib/libX.so.y is there, 
> and if it isn't it looks if /lib/libX.so.y is available.
>
> AFAIR a work around is to add a link in /compat/linux/usr/lib/librt.so.1 -> 
> /lib/librt.so.1
>
> I want to do something like this in the FC4 port, but hadn't time to do it 
> and test it so far.

It sounds like the real problem is that there are some cases where we don't 
want the Linuxulator to merge the underlying and Linux views of the file 
system -- we don't want the union of /compat/linux/lib and /lib, we just want 
/compat/linux/lib?

Robert N M Watson
Computer Laboratory
University of Cambridge
_______________________________________________
freebsd-hackers <at> freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe <at> freebsd.org"

Nikos Ntarmos | 2 Dec 2007 02:30
Picon
Favicon
Gravatar

Re: Linux executable picks up FreeBSD library over linux one and breaks


On Sat, Dec 01, 2007 at 11:01:46PM +0000, Robert Watson wrote:
> 
> On Sat, 1 Dec 2007, Alexander Leidinger wrote:
> 
> >Have a look at the search order of libs in linux. Correlate this with
> >the fact that when in linux an access is done to e.g. /lib/libX.so.y
> >which means that the linuxulator first looks if
> >/compat/linux/lib/libX.so.y is there, and if it isn't it looks if
> >/lib/libX.so.y is available.
> >
> >AFAIR a work around is to add a link in
> >/compat/linux/usr/lib/librt.so.1 -> /lib/librt.so.1
> >
> >I want to do something like this in the FC4 port, but hadn't time to
> >do it and test it so far.
> 
> It sounds like the real problem is that there are some cases where we
> don't want the Linuxulator to merge the underlying and Linux views of
> the file system -- we don't want the union of /compat/linux/lib and
> /lib, we just want /compat/linux/lib?

The problem mainly arises when a library appears earlier in the search
path in the underlying view of the file system than in the Linux view.
(e.g. there is no /compat/linux/path1/lib/libX.so.y but there is a
/path2/libX.so.y and path2 appears before path1 in the ld search path).
X-related libraries are a good example; since we moved to a
${LOCALBASE}-based X hierarchy, all X-based dynamically-linked linux
binaries pick up the native X libraries (i.e. from /usr/local/lib),
unless advised otherwise (e.g. via
(Continue reading)


Gmane