Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 511680 - =dev-libs/gmp-6.0.0a: configure fails on Gentoo/FreeBSD (m4 vs gm4)
Summary: =dev-libs/gmp-6.0.0a: configure fails on Gentoo/FreeBSD (m4 vs gm4)
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: FreeBSD (show other bugs)
Hardware: All FreeBSD
: Normal normal (vote)
Assignee: Gentoo/BSD Team
URL: https://gmplib.org/repo/gmp-6.0/rev/b...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-28 10:45 UTC by Yuta SATOH
Modified: 2019-10-11 17:37 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch for gmp-6.0.0a.ebuild (511680.patch,720 bytes, patch)
2014-05-28 10:46 UTC, Yuta SATOH
Details | Diff
gmp-6.0.0a.ebuild.patch (gmp-6.0.0a.ebuild.patch,503 bytes, patch)
2014-06-24 08:28 UTC, Naohiro Aota
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuta SATOH 2014-05-28 10:45:41 UTC
The following message is displayed and fails to econf.


<snip>
checking sstream presence... yes
checking for sstream... yes
checking for std::locale... yes
checking for suitable m4... configure.wrapped: error: No usable m4 in $PATH or /usr/5bin (see config.log for reasons).

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/dev-libs/gmp-6.0.0a/work/gmp-6.0.0-abi_x86_64.amd64_fbsd/config.log
 * ERROR: dev-libs/gmp-6.0.0a::gentoo failed (configure phase):
 *   econf failed



/var/tmp/portage/dev-libs/gmp-6.0.0a/work/gmp-6.0.0-abi_x86_64.amd64_fbsd/config.log

configure.wrapped:24736: checking for suitable m4
trying m4
bad:  doesnt support radix in eval (FreeBSD 8.x,9.0,9.1,9.2 m4)
trying /usr/lib/portage/bin/ebuild-helpers/bsd/m4
/var/tmp/portage/dev-libs/gmp-6.0.0a/work/gmp-6.0.0/configure.wrapped: /usr/lib/portage/bin/ebuild-helpers/bsd/m4: not found

trying /usr/lib/portage/bin/ebuild-helpers/m4
/var/tmp/portage/dev-libs/gmp-6.0.0a/work/gmp-6.0.0/configure.wrapped: /usr/lib/portage/bin/ebuild-helpers/m4: not found

trying /usr/local/sbin/m4
/var/tmp/portage/dev-libs/gmp-6.0.0a/work/gmp-6.0.0/configure.wrapped: /usr/local/sbin/m4: not found

trying /usr/local/bin/m4
/var/tmp/portage/dev-libs/gmp-6.0.0a/work/gmp-6.0.0/configure.wrapped: /usr/local/bin/m4: not found

trying /usr/sbin/m4
/var/tmp/portage/dev-libs/gmp-6.0.0a/work/gmp-6.0.0/configure.wrapped: /usr/sbin/m4: not found

trying /usr/bin/m4
bad:  doesnt support radix in eval (FreeBSD 8.x,9.0,9.1,9.2 m4)
trying /sbin/m4
/var/tmp/portage/dev-libs/gmp-6.0.0a/work/gmp-6.0.0/configure.wrapped: /sbin/m4: not found

trying /bin/m4
/var/tmp/portage/dev-libs/gmp-6.0.0a/work/gmp-6.0.0/configure.wrapped: /bin/m4: not found

trying /opt/bin/m4
/var/tmp/portage/dev-libs/gmp-6.0.0a/work/gmp-6.0.0/configure.wrapped: /opt/bin/m4: not found

trying /usr/x86_64-gentoo-freebsd9.1/gcc-bin/4.6.4/m4
/var/tmp/portage/dev-libs/gmp-6.0.0a/work/gmp-6.0.0/configure.wrapped: /usr/x86_64-gentoo-freebsd9.1/gcc-bin/4.6.4/m4: not found

trying /usr/5bin/m4
/var/tmp/portage/dev-libs/gmp-6.0.0a/work/gmp-6.0.0/configure.wrapped: /usr/5bin/m4: not found

configure.wrapped:24774: error: No usable m4 in $PATH or /usr/5bin (see config.log for reasons).
Comment 1 Yuta SATOH 2014-05-28 10:46:57 UTC
Created attachment 377756 [details, diff]
patch for gmp-6.0.0a.ebuild

force use gm4 on Gentoo/FreeBSD.
Comment 2 Naohiro Aota gentoo-dev 2014-05-30 03:46:39 UTC
Comment on attachment 377756 [details, diff]
patch for gmp-6.0.0a.ebuild

>+	# force use gm4 on Gentoo/FreeBSD. bug 511680.
>+	use userland_BSD && export gmp_cv_prog_m4=gm4

Using M4 variable instead would be more clean.

IMHO M4 variable could be set as "gm4" in profile/bsd/fbsd/make.defaults
Comment 3 Yuta SATOH 2014-05-30 11:16:55 UTC
(In reply to Naohiro Aota from comment #2)
> Comment on attachment 377756 [details, diff] [details, diff]
> patch for gmp-6.0.0a.ebuild
> 
> >+	# force use gm4 on Gentoo/FreeBSD. bug 511680.
> >+	use userland_BSD && export gmp_cv_prog_m4=gm4
> 
> Using M4 variable instead would be more clean.
> 
> IMHO M4 variable could be set as "gm4" in profile/bsd/fbsd/make.defaults

Thank you for reply.
Please add M4 variable to the profile in order to prevents similar problems.

Please don't forget to add sys-devel/m4 to packages.build.
Comment 4 SpanKY gentoo-dev 2014-06-17 01:44:24 UTC
Comment on attachment 377756 [details, diff]
patch for gmp-6.0.0a.ebuild

yeah, i don't think this is a scalable way forward.  other packages sometimes run m4 outside of just autotools.
Comment 5 Naohiro Aota gentoo-dev 2014-06-24 08:28:56 UTC
Created attachment 379556 [details, diff]
gmp-6.0.0a.ebuild.patch

I considered this problem and finally concluded as the following:

- Use M4, autoconf variable is not portable way to set m4 instance
- Use '[[ ${USERLAND} != "GNU" ]]', because that is what sys-devel/m4 is using
- No M4 export in profiles (unless we hit another program depending on GNU m4)
- gmp itself should be patched to try for "gm4" (future work)
Comment 6 SpanKY gentoo-dev 2014-06-24 21:41:20 UTC
off the top of my head, these packages also run m4 directly:
 - elfutils
 - openssl
 - nettle
 - ppl
Comment 7 Naohiro Aota gentoo-dev 2014-07-07 01:50:41 UTC
(In reply to SpanKY from comment #6)
> off the top of my head, these packages also run m4 directly:
>  - elfutils
>  - openssl
>  - nettle
>  - ppl

But they dose not depend on GNU variant so seriously.
Comment 8 Emre Eryilmaz 2014-07-14 00:40:39 UTC
This patch was applied ? I'm getting the same error.
Comment 9 i.Dark_Templar 2015-03-28 08:47:21 UTC
I've hit this issue too, and fixed it similar way.

I also must note, that if portage ever gets to differ between USERLAND and PORTAGE_USERLAND (host userland), PORTAGE_USERLAND should be checked here I think.
Comment 10 SpanKY gentoo-dev 2015-08-29 21:14:18 UTC
you should put this in the profile's make.defaults imo
Comment 11 Andreas K. Hüttel archtester gentoo-dev 2018-06-20 21:48:09 UTC
Is this still broken with recent gmp?
Comment 12 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-10-11 17:37:32 UTC
*-fbsd is gone.