[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Darwin / OS X

From: Max Horn
Subject: Darwin / OS X
Date: Fri, 14 Sep 2001 17:34:38 +0200

HI there,

I am using libtool on Mac OS X (both Darwin 1.3.7 and Darwin 1.4). Sadly, there are still some problems with conveniance libs, and others, too.

1) To cite Christoph Pfisterer:

The problem is that convenience libraries are added to both
$convenience and $deplibs. That causes the library to be
listed twice on the final link command line. That's a
problem on platforms with pedantic linkers like Darwin,
which complain about duplicate symbols as a result.

Look at for some more info an a patch, which sadly causes your cdemo self-tst to fail :/ (excuse my bad patch there, formating got lost with copy&paste, but Christoph added a better one later).

OK, so this causes cdemo to fail... however, since cdemo and a lot of other "make check" fail even with libtool 1.4.1 or cvs head on darwin, we have no way to check & fix this. Could somebody please tell us what fails, then we can try to find a better solution. Without the patch, several projects that use conveniance libs fail to build for me; with the patch, they all work fine. So even if this patch is bad, we need some other patch to support OS X/darwin. ("we" meaning: everybody who wants to target darwin, like me or Christoph :) Sadly, it is not very easy to dig though the libtool code, and understand it, but we'll try.

2) 30 of 80 "make check" tests fail on OS X in libtool HEAD-cvs... not good :/
Is there some way to get "make check" to put out some more info on what exactly fails? So far what I do is to run the failed tests manually, though I am not 100% this is the correct thing to do.

Let me give some example:

* tagdemo-make.test
fails because of this:

/usr/bin/ld: Undefined symbols:

At no point can I see that it links against libstdc++, so I tried tagdemo-conf.test (which passes), but I see nothing in there that attempts to find a run time lib or something. As Darwin basically uses a somewhat modified version of gcc, I wonder what is the difference here? Any ideas?

* quote.test
Only sub-test that fails is \\ quoting, i.e.:
= trying: \\ quoting
= failed: mkdir .libs
cc -c -DVAR=\test\ foo.c  -fno-common -DPIC -o .libs/foo.o
cc -c -DVAR=\test\ foo.c -o foo.o >/dev/null 2>&1

Anything I can do about it? Is this a serious problem for libtool?

* cdemo-make.test
..fails. (cdemo-static.test passed BTW). The output is:

cc -DPACKAGE=\"cdemo\" -DVERSION=\"0.1\" -DHAVE_MATH_H=1 -I. -I/Users/maxhorn/Projekte/foreign/libtool/tests/../cdemo -g -O2 -c main.c
/bin/sh ./libtool --mode=link cc  -g -O2  -o cdemo  main.o
cc -g -O2 -o cdemo main.o  -lm
/usr/bin/ld: Undefined symbols:
make: *** [cdemo] Error 1

Now of course that fails! The proper link command works fine, though:
cc -g -O2 -o cdemo main.o .libs/libfoo.a
Any hint why it would do this exceedingly strange thing? Also not that there is no need for -lm on OS X, I thought it would detect that

* demo-make.test
Fails. There seems to be a quoting problem, for the created "helldlS.c" look like this:
lt_preloaded_symbols[] =
  {libhello.2.dylib, (lt_ptr) 0},
  {"hello", (lt_ptr) &hello},
  {"foo", (lt_ptr) &foo},
  {"nothing", (lt_ptr) &nothing},
  {0, (lt_ptr) 0}

There are many more tests failing, but this mail is already very long and I better stop. Please forgive me and tell me if this mail is inappropriate. I sincerly would like to overcome these problems by myself and just submit nice clean patches to you, however, at least right now I am not able to do so, hence I hope that maybe you as experts in libtool matters, can help. I fully understand that you have other probably more important tasks to think of, but I still hope something can be done on these problem.s

I am still reading through "GNU Autoconf, Automake and Libtool", and excellent book BTW!



P.S.: I think I read in your mailing list archives something about 1.4.2 being released, but the web page still lists 1.4.1 as current?
Max Horn
Software Developer

email: <mailto:address@hidden>
phone: (+49) 6151-494890

reply via email to

[Prev in Thread] Current Thread [Next in Thread]