Bug 162014 - [PATCH] Use libtool while building math/fftw3
Summary: [PATCH] Use libtool while building math/fftw3
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Brendan Fabeny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-25 20:20 UTC by Xin LI
Modified: 2011-10-29 04:11 UTC (History)
1 user (show)

See Also:


Attachments
fftw3.diff (504 bytes, patch)
2011-10-25 20:20 UTC, Xin LI
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xin LI freebsd_committer 2011-10-25 20:20:10 UTC
	fftw3 is not using libtool properly.

How-To-Repeat: 	Build fftw3 on 10-CURRENT with libtool updated
to 2.4.2 or any fixed version of libtool.
Comment 1 Edwin Groothuis freebsd_committer 2011-10-25 20:20:23 UTC
Responsible Changed
From-To: freebsd-ports-bugs->bf

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 b. f. 2011-10-25 20:59:38 UTC
You mean that it is using a bundled version of libtool, rather than
devel/libtool?  That is not uncommon in ports.  This port is often
built by users with lang/gcc4*, and devel/libtool is known to have
problems when building a port with a different toolchain than the one
used to build devel/libtool, because devel/libtool caches the wrong
information about the toolchain.  Also, the USE_BINUTILS construct has
not yet been fixed for ports that set USE_AUTOTOOLS.  So I'd prefer to
use the bundled version, if possible, until these problems have been
fixed.  What specifically is going wrong on 10 with the bundled
version of libtool?

b.
Comment 3 Xin LI 2011-10-25 21:41:25 UTC
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 10/25/11 12:59, b. f. wrote:
> You mean that it is using a bundled version of libtool, rather
> than devel/libtool?  That is not uncommon in ports.  This port is
> often built by users with lang/gcc4*, and devel/libtool is known to
> have problems when building a port with a different toolchain than
> the one used to build devel/libtool, because devel/libtool caches
> the wrong information about the toolchain.  Also, the USE_BINUTILS
> construct has not yet been fixed for ports that set USE_AUTOTOOLS.
> So I'd prefer to use the bundled version, if possible, until these
> problems have been fixed.  What specifically is going wrong on 10
> with the bundled version of libtool?

Bundled version will not install shared libraries as required by other
ports that depends on fftw3.

The problem is that fftw3 uses an older version of libtool it bundled,
which uses freebsd1* (maybe also freebsd[12]* etc) to match FreeBSD
1.x, rather than using the right form, freebsd1.*.

Personally I think it does not make sense not to use USE_AUTOTOOLS
just because of it have bugs -- unless it takes forever to fix these
bugs -- as duplicated code is always harmful, we already see the
tragic result of tolerating these and having FreeBSD version bumped to
10...  But bottom line, please at least patch the corresponding
scripts or ask the upstream to update bundled libtool to 2.4.2.

Cheers,
- -- 
Xin LI <delphij@delphij.net>	https://www.delphij.net/
FreeBSD - The Power to Serve!		Live free or die
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (FreeBSD)

iQEcBAEBCAAGBQJOpx70AAoJEATO+BI/yjfBTegIAKV4bKMZGqxSVdowkMOH6tY6
v9gbdqzV49OWsbr3mHbUhMYv0gzA3gQgtgLCdgj7YXP4Epz7U5fB7q59xM98mApW
ADm+lxt2LCGKJZD+bQsfNnFwY2KRp3VqyIZ/tPgYDtn86NMZQQHxZAZFKb+G3jY3
bb1s2iCZZvOyUGHefF1pAUYBoJE/297nG8vYXVVh2WTG//UOZAoZMcsXtSNH4ouY
XSq3xXL58T5s6gNpjyvToHr5bS20IMv86TiJJrGK3lEh4NzQoUaTKym6kHSje2Rh
fuA/bVRzGTSyGv6EXfzbyXJq2MwIOuyUYheSjCWkPCJ+8tRL6YipnRfitThCc0I=
=NbLj
-----END PGP SIGNATURE-----
Comment 4 b. f. 2011-10-25 23:30:06 UTC
On 10/25/11, Xin LI <delphij@delphij.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> On 10/25/11 12:59, b. f. wrote:
...
>
> The problem is that fftw3 uses an older version of libtool it bundled,
> which uses freebsd1* (maybe also freebsd[12]* etc) to match FreeBSD
> 1.x, rather than using the right form, freebsd1.*.

Ok, this is what I meant.  I should have fixed these earlier, but I
forgot because I was masquerading as 9.9, and the (now-reverted)
changes to /usr/share/mk/bsd.port.mk would have intervened at the
time, anyway.  portmgr is testing a generic fix for such problems that
should be in the tree soon, and in the meantime i will patch the port.

>
> Personally I think it does not make sense not to use USE_AUTOTOOLS
> just because of it have bugs -- unless it takes forever to fix these
> bugs -- as duplicated code is always harmful, we already see the
> tragic result of tolerating these and having FreeBSD version bumped to

I would much prefer to use the latest version of libtool from
devel/libtool, but, as I tried to explain, USE_AUTOTOOLS does not work
with different toolchains.  If I add your patch without additional
work-arounds, it would break default builds of math/fftw3-quad at the
linking stage, and builds of all flavors for the many users that
choose to use lang/gcc4* for this port.  This problem has been known
for at least four years, and there have been no signs of progress in
the open PRs dealing with it, e.g. ports/155105, ports/155546 (in
which only part of the problem involving the linker is mentioned, and
not other toolchain differences).  I have suggested generating libtool
on-the-fly in these cases, as is done in some ports, or having
toolchain-specific libtool slave ports for the most commonly-used
toolchains (I posted a sample patch to do this for lang/gcc4* on
freebsd-ports), but no one has acted on these suggestions.

The other problem involving devel/libtool, which I can circumvent on
some architectures, has also been neglected, even though I have asked
members of portmgr several times to look into it: ports/155201.

> 10...  But bottom line, please at least patch the corresponding
> scripts or ask the upstream to update bundled libtool to 2.4.2.

For the moment, I will patch the port and ask upstream to move to a
later version of libtool.

Regards,

b.
Comment 5 Rainer Hurling freebsd_committer 2011-10-27 21:26:54 UTC
If I understand it right, this patch is waiting for an update of libtool?

After todays patch of bsd.port.mk I changed from 9.0-BETA1 to 10-CURRENT 
and run into trouble with fftw3 (no shared libs). I inserted 
'WITH_FBSD10_FIX= yes' into the Makefile of fftw3 and all went fine 
after that.

Am I totally wrong or could this be an interim solution to get fftw3 
working with 10-CURRENT while waiting for the libtool update?

Rainer Hurling
Comment 6 Xin LI 2011-10-27 22:20:32 UTC
Hi,

On Thu, Oct 27, 2011 at 1:26 PM, Rainer Hurling <rhurlin@gwdg.de> wrote:
> If I understand it right, this patch is waiting for an update of libtool?

Yes, ports/162012...  For now you may have to use some alternative...

Cheers,
-- 
Xin LI <delphij@delphij.net> https://www.delphij.net/
FreeBSD - The Power to Serve! Live free or die
Comment 7 b. f. 2011-10-27 23:26:42 UTC
On 10/27/11, Rainer Hurling <rhurlin@gwdg.de> wrote:
> If I understand it right, this patch is waiting for an update of libtool?
>
> After todays patch of bsd.port.mk I changed from 9.0-BETA1 to 10-CURRENT
> and run into trouble with fftw3 (no shared libs). I inserted
> 'WITH_FBSD10_FIX= yes' into the Makefile of fftw3 and all went fine
> after that.
>
> Am I totally wrong or could this be an interim solution to get fftw3
> working with 10-CURRENT while waiting for the libtool update?

No, you are right, and this is what I am going to insert into the port
Makefile soon.  I didn't add my own workaround yesterday because I was
told that the fix was going to be added soon. Incidentally, you don't
have to use the port Makefile for changes like this, you can place it
in another included Makefile, e.g. /etc/make.conf, where it won't be
overwritten by subsequent updates of your ports tree.

b.

b.
Comment 8 Brendan Fabeny freebsd_committer 2011-10-29 04:11:43 UTC
State Changed
From-To: open->closed

The problem should now be fixed by the use of WITH_FBSD10_FIX.