[haiku-development] Re: missing -lm?

  • From: Andreas Färber <andreas.faerber@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Fri, 2 May 2008 15:35:31 +0200


Am 02.05.2008 um 14:36 schrieb François Revol:


On 2008-05-01 at 13:48:20 [+0200], Axel Dörfler <axeld@xxxxxxxxxxxxxxxx >
wrote:
Andreas Färber <andreas.faerber@xxxxxx> wrote:
Am 29.04.2008 um 11:35 schrieb Axel Dörfler:
Grzegorz Dbrowski <grzegorz.dabrowski@xxxxxxxxx> wrote:
Maybe we should add symlinks like this, what do you think?
I'm on François' side here: rather fix the buggy software.
We're
already making so many compromises for those...
In that case we should be consequent and eliminate the Be
compability
symlinks from the develop libs as well. They would still exist in
the
system libs folder for runtime compatibility.

This would help cleaning up the -lnet / -lbind -lsocket
confusion;
looking at the symlinks, it seems new Haiku ports should be fixed
to
link against -lnetwork instead.

Absolutely! Having those links (and using them) in develop/lib is
just
wrong, and
could even cause the network functions to fail. I didn't notice
they are
there,
yet.

How about keeping the libsocket.so symlink at least? This one is not
uncommon on other platforms (some/all (?) *BSDs and Solaris seem to
have
it) and configure scripts already check for it, which should save
some
porting work.

Yes, and some makefiles I wrote check for it to detect BONE...
(but some others check for headers/be/bone, will need to change that)

Most checks for BONE that I've seen failed for Haiku. Some of them checked for BONE_VERSION in sys/socket.h and thus dropped back to R5 sections. Haiku is not BONE, even for BONE there are some unnecessary code paths around; making them fail seems like the easiest way to get rid of or to discover them. (Haiku's Find doesn't seem able to do full- text searches?)

Many autoconf scripts just check whether libsocket contains a certain function and, if yes, add -lsocket. On Haiku one may end up with - lnetwork -lsocket for APR, just because it's there.

Another example where Haiku's offerings are problematic is, libroot implements __fsetlocking but does not provide the stdio_ext.h header for software to actually use it. Similarly, it does not offer __libc_define_lock et al. through any public header. Of course you can always say, it's not Haiku's fault, it's the bad checks; the problem is, you never know whether something should be there and hasn't been done yet or whether it was a conscious decision to omit it permanently for some reason...

Currently, the network aliases are being added to the optional package via one variable, so that they're easy to remove. In that case, to enable detection of BONE, the system library path could be added via -L in LDFLAGS, since unpatched configure scripts will need --build=i586-pc-beos anyway.

Andreas

Other related posts: