Bug 148255 - [patch] lang/perl5.10: fails to build when uname contains `=' char
Summary: [patch] lang/perl5.10: fails to build when uname contains `=' char
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: Philip M. Gollucci
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-30 08:20 UTC by swell.k
Modified: 2010-12-11 17:50 UTC (History)
0 users

See Also:


Attachments
uname (104 bytes, text/plain)
2010-06-30 08:20 UTC, swell.k
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description swell.k 2010-06-30 08:20:06 UTC
As of r197433 $SYSDIR/conf/newvers.sh may genarate uname that contains `=' (equal sign).

The error is similar to
  http://bugs.gentoo.org/show_bug.cgi?id=203458#c11

Fix: Workaround:
How-To-Repeat: $ make
...
cc -o libperl.so.1001 -L/usr/pkg/lib -fstack-protector op.o perl.o   gv.o toke.o perly.o pad.o regcomp.o dump.o util.o mg.o reentr.o mro.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o xsutils.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o pp_pack.o pp_sort.o   DynaLoader.o -lm -lcrypt -lutil -lc
/usr/pkg/bin/ld: /usr/lib/crt1.o: in function _start:/a/dirty_build/lib/csu/amd64/crt1.c:93: error: undefined reference to 'main'
collect2: ld returned 1 exit status
*** Error code 1

$ fgrep myuname $(make -V WRKSRC)/config.sh
myuname='f9b9ab9-dirty: tue jun 29 00:46:39 utc 2010 holo@raphael.local:aobjdiradirty_buildsysphoenix amd64 '
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2010-06-30 08:20:17 UTC
Responsible Changed
From-To: freebsd-ports-bugs->skv

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 swell.k 2010-07-16 22:01:32 UTC
It affects lang/perl5.8 and lang/perl5.12, too.
Comment 3 swell.k 2010-08-03 16:42:19 UTC
I forgot that uname(1) behavior can be altered via environment.
The following workaround is less intrusive than above wrapper script.

--- a.diff begins here ---
Index: lang/perl5.12/Makefile
===================================================================
RCS file: /a/.cvsup/ports/lang/perl5.12/Makefile,v
retrieving revision 1.122
diff -u -p -r1.122 Makefile
--- lang/perl5.12/Makefile	23 Jul 2010 17:41:03 -0000	1.122
+++ lang/perl5.12/Makefile	3 Aug 2010 15:35:59 -0000
@@ -59,7 +59,7 @@ CONFIGURE_ARGS=	-sde -Dprefix=${PREFIX} 
 LOCALE_CLEANUP=	LANG="" LC_ALL="" LC_COLLATE="" LC_CTYPE="" \
 		LC_MESSAGES="" LC_MONETARY="" LC_NUMERIC="" \
 		LC_TIME=""
-CONFIGURE_ENV+=	${LOCALE_CLEANUP}
+CONFIGURE_ENV+=	${LOCALE_CLEANUP} UNAME_v="$$(uname -v | sed 's/=[^:]*//')"
 MAKE_ENV+=	${LOCALE_CLEANUP}
 
 .include "Makefile.man"
--- a.diff ends here ---
Comment 4 swell.k 2010-08-11 13:04:59 UTC
More simple version that works with misc/149510.

--- a.diff begins here ---
Index: lang/perl5.12/Makefile
===================================================================
RCS file: /a/.cvsup/ports/lang/perl5.12/Makefile,v
retrieving revision 1.122
diff -u -p -r1.122 Makefile
--- lang/perl5.12/Makefile	23 Jul 2010 17:41:03 -0000	1.122
+++ lang/perl5.12/Makefile	11 Aug 2010 11:58:47 -0000
@@ -59,7 +59,7 @@ CONFIGURE_ARGS=	-sde -Dprefix=${PREFIX} 
 LOCALE_CLEANUP=	LANG="" LC_ALL="" LC_COLLATE="" LC_CTYPE="" \
 		LC_MESSAGES="" LC_MONETARY="" LC_NUMERIC="" \
 		LC_TIME=""
-CONFIGURE_ENV+=	${LOCALE_CLEANUP}
+CONFIGURE_ENV+=	${LOCALE_CLEANUP} UNAME_v="$$(uname -v | sed 'y/=/ /')"
 MAKE_ENV+=	${LOCALE_CLEANUP}
 
 .include "Makefile.man"
--- a.diff ends here ---
Comment 5 Philip M. Gollucci freebsd_committer freebsd_triage 2010-12-10 03:25:19 UTC
Responsible Changed
From-To: skv->pgollucci

committer&maintainer timeout (skv ; 121 days) / last commit: 5 days ago
Comment 6 Philip M. Gollucci freebsd_committer freebsd_triage 2010-12-10 23:03:16 UTC
State Changed
From-To: open->closed

Committed, Thanks!
Comment 7 dfilter service freebsd_committer freebsd_triage 2010-12-10 23:03:16 UTC
pgollucci    2010-12-10 23:03:12 UTC

  FreeBSD ports repository

  Modified files:
    lang/perl5.10        Makefile 
  Log:
  - Support = in hostnames compatiable with misc/149510.
  
  PR:             ports/148255
  Submitted by:   Anonymous <swell.k@gmail.com>
  Approved by:    maintainer timeout (skv ; 121 days)
  
  Revision  Changes    Path
  1.125     +1 -1      ports/lang/perl5.10/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 8 dfilter service freebsd_committer freebsd_triage 2010-12-11 17:46:19 UTC
pgollucci    2010-12-11 17:46:13 UTC

  FreeBSD ports repository

  Modified files:
    lang/perl5.8         Makefile 
    lang/perl5.12        Makefile 
  Log:
  - Support = in hostnames compatiable with misc/149510.
    duplicate fix in other perl ports
  
  PR:             ports/148255
  Submitted by:   Anonymous <swell.k@gmail.com>
  Approved by:    maintainer timeout (skv ; 121 days)
  
  Revision  Changes    Path
  1.129     +1 -1      ports/lang/perl5.12/Makefile
  1.115     +1 -1      ports/lang/perl5.8/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"