Bug 167071 - devel/git 1.7.9.6 fails to link on FreeBSD/amd64 9.0-STABLE as of 2012-04-18
Summary: devel/git 1.7.9.6 fails to link on FreeBSD/amd64 9.0-STABLE as of 2012-04-18
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: Wesley Shields
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-18 18:30 UTC by Trond Endrestøl
Modified: 2012-05-06 20:10 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Trond Endrestøl 2012-04-18 18:30:02 UTC
Running make in /usr/ports/devel/git, even with a freshly CVSup'd ports tree, ends in the following error message:

gmake -C gitweb  all
gmake[1]: Entering directory `/usr/ports/devel/git/work/git-1.7.9.6/gitweb'
gmake -C ../  GIT-VERSION-FILE
gcc  -O2 -pipe -I/usr/local/include -fno-strict-aliasing -I. -I/usr/local/include -I/usr/local/include -I/usr/include -DUSE_ST_TIMESPEC -DOLD_ICONV -pthread -DHAVE_PATHS_H -DHAVE_LIBCHARSET_H -DSHA1_HEADER='<openssl/sha.h>'  -DFREAD_READS_DIRECTORIES -DDIR_HAS_BSD_GROUP_SEMANTICS -o git-daemon -L/usr/local/lib -rpath=/usr/lib:/usr/local/lib  -L/usr/local/lib daemon.o libgit.a xdiff/lib.a  -lz -lintl -L/usr/lib -R/usr/lib -lcrypto -pthread
gcc  -O2 -pipe -I/usr/local/include -fno-strict-aliasing -I. -I/usr/local/include -I/usr/local/include -I/usr/include -DUSE_ST_TIMESPEC -DOLD_ICONV -pthread -DHAVE_PATHS_H -DHAVE_LIBCHARSET_H -DSHA1_HEADER='<openssl/sha.h>'  -DFREAD_READS_DIRECTORIES -DDIR_HAS_BSD_GROUP_SEMANTICS -o git-fast-import -L/usr/local/lib -rpath=/usr/lib:/usr/local/lib  -L/usr/local/lib fast-import.o libgit.a xdiff/lib.a  -lz -lintl -L/usr/lib -R/usr/lib -lcrypto -pthread
gcc  -O2 -pipe -I/usr/local/include -fno-strict-aliasing -I. -I/usr/local/include -I/usr/local/include -I/usr/include -DUSE_ST_TIMESPEC -DOLD_ICONV -pthread -DHAVE_PATHS_H -DHAVE_LIBCHARSET_H -DSHA1_HEADER='<openssl/sha.h>'  -DFREAD_READS_DIRECTORIES -DDIR_HAS_BSD_GROUP_SEMANTICS -o git-imap-send -L/usr/local/lib -rpath=/usr/lib:/usr/local/lib  -L/usr/local/lib imap-send.o \
        libgit.a xdiff/lib.a  -lz -lintl -L/usr/lib -R/usr/lib -lcrypto -pthread  -L/usr/lib -R/usr/lib -lssl -L/usr/lib -R/usr/lib -lcrypto
libgit.a(gettext.o): In function `git_setup_gettext':
gettext.c:(.text+0x46): undefined reference to `locale_charset'
libgit.a(gettext.o): Inlibgit.a(gettext.o): In function `git_setup_gettext':
gettext.c:(.text+0x46): undefined reference to `locale_charset'
 function `git_setup_gettext':
gettext.c:(.text+0x46): undefined reference to `locale_charset'
gmake: *** [git-fast-import] Error 1
gmake: *** Waiting for unfinished jobs....
gmake: *** [git-daemon] Error 1
gmake: *** [git-imap-send] Error 1
gmake[2]: Entering directory `/usr/ports/devel/git/work/git-1.7.9.6'
gmake[2]: `GIT-VERSION-FILE' is up to date.
gmake[2]: Leaving directory `/usr/ports/devel/git/work/git-1.7.9.6'
gmake[1]: Leaving directory `/usr/ports/devel/git/work/git-1.7.9.6/gitweb'
*** Error code 1

Stop in /usr/ports/devel/git.
*** Error code 1

Stop in /usr/ports/devel/git.

Compilation seems to be running in parallel, though not specified by me, resulting in jumbled output.

More details can be found at URL:
http://ximalas.info/~trond/devel-git/

All prerequisite are present, evidently by these remarks made during the build:

===>  Applying FreeBSD patches for git-1.7.9.6
===>   git-1.7.9.6 depends on file: /usr/local/lib/perl5/site_perl/5.14.2/Error.pm - found
===>   git-1.7.9.6 depends on executable: curl - found
===>   git-1.7.9.6 depends on file: /usr/local/bin/python2.7 - found
===>   git-1.7.9.6 depends on executable: gmake - found
===>   git-1.7.9.6 depends on file: /usr/local/bin/perl5.14.2 - found
===>   git-1.7.9.6 depends on shared library: expat.6 - found
===>   git-1.7.9.6 depends on shared library: iconv.3 - found
===>   git-1.7.9.6 depends on shared library: intl - found
===>  Configuring for git-1.7.9.6

This problem also exists on 10.0-CURRENT, see:
http://lists.freebsd.org/pipermail/freebsd-current/2012-March/032664.html

How-To-Repeat: <update the ports tree>
cd /usr/ports/devel/git
rm -Rf work
make
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-04-18 18:30:47 UTC
Responsible Changed
From-To: freebsd-ports-bugs->wxs

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Trond Endrestøl 2012-04-21 16:53:53 UTC
Patch follows, store as devel/git/files/patch-Makefile2 or incorporate 
as you see fit into devel/git/files/patch-Makefile:

--- Makefile.orig2      2012-04-21 17:34:38.723331000 +0200
+++ Makefile    2012-04-21 17:42:31.979651172 +0200
@@ -1479,7 +1479,7 @@
 endif
 ifndef NO_GETTEXT
 ifndef LIBC_CONTAINS_LIBINTL
-       EXTLIBS += -lintl
+       EXTLIBS += -lintl -lcharset
 endif
 endif
 ifdef NEEDS_SOCKET

-- 
----------------------------------------------------------------------
Trond Endrestøl                     |     Trond.Endrestol@ximalas.info
ACM, NAS, NUUG, SAGE, USENIX        |   FreeBSD 9.0-S & re-Alpine 2.02
Comment 3 Wesley Shields freebsd_committer freebsd_triage 2012-04-22 19:18:40 UTC
On Sat, Apr 21, 2012 at 04:00:26PM +0000, Trond Endrest?l wrote:
> The following reply was made to PR ports/167071; it has been noted by GNATS.
> 
> From: =?ISO-8859-1?Q?Trond_Endrest=F8l?= <Trond.Endrestol@ximalas.info>
> To: bug-followup@FreeBSD.org, kientzle@FreeBSD.org
> Cc:  
> Subject: Re: ports/167071: devel/git 1.7.9.6 fails to link on FreeBSD/amd64
>  9.0-STABLE as of 2012-04-18
> Date: Sat, 21 Apr 2012 17:53:53 +0200 (CEST)
> 
>    This message is in MIME format.  The first part should be readable text,
>    while the remaining parts are likely unreadable without MIME-aware tools.
>  
>  --598627194-1920432307-1335023633=:1430
>  Content-Type: TEXT/PLAIN; charset=ISO-8859-1
>  Content-Transfer-Encoding: 8BIT
>  
>  Patch follows, store as devel/git/files/patch-Makefile2 or incorporate 
>  as you see fit into devel/git/files/patch-Makefile:
>  
>  --- Makefile.orig2      2012-04-21 17:34:38.723331000 +0200
>  +++ Makefile    2012-04-21 17:42:31.979651172 +0200
>  @@ -1479,7 +1479,7 @@
>   endif
>   ifndef NO_GETTEXT
>   ifndef LIBC_CONTAINS_LIBINTL
>  -       EXTLIBS += -lintl
>  +       EXTLIBS += -lintl -lcharset
>   endif
>   endif
>   ifdef NEEDS_SOCKET

Thanks for this, but I think I have what might be a better solution.

I'm currently experimenting with adding CHARSET_LIB=-lcharset to
MAKE_ENV in the ports Makefile (not work/git*/Makefile). Can you try
setting that and let me know how it goes for you?

-- WXS
Comment 4 Trond Endrestøl 2012-04-23 07:53:08 UTC
On Sun, 22 Apr 2012 14:18-0400, Wesley Shields wrote:

> On Sat, Apr 21, 2012 at 04:00:26PM +0000, Trond Endrest?l wrote:
> > The following reply was made to PR ports/167071; it has been noted by GNATS.
> > 
> > From: =?ISO-8859-1?Q?Trond_Endrest=F8l?= <Trond.Endrestol@ximalas.info>
> > To: bug-followup@FreeBSD.org, kientzle@FreeBSD.org
> > Cc:  
> > Subject: Re: ports/167071: devel/git 1.7.9.6 fails to link on FreeBSD/amd64
> >  9.0-STABLE as of 2012-04-18
> > Date: Sat, 21 Apr 2012 17:53:53 +0200 (CEST)
> > 
> >    This message is in MIME format.  The first part should be readable text,
> >    while the remaining parts are likely unreadable without MIME-aware tools.
> >  
> >  --598627194-1920432307-1335023633=:1430
> >  Content-Type: TEXT/PLAIN; charset=ISO-8859-1
> >  Content-Transfer-Encoding: 8BIT
> >  
> >  Patch follows, store as devel/git/files/patch-Makefile2 or incorporate 
> >  as you see fit into devel/git/files/patch-Makefile:
> >  
> >  --- Makefile.orig2      2012-04-21 17:34:38.723331000 +0200
> >  +++ Makefile    2012-04-21 17:42:31.979651172 +0200
> >  @@ -1479,7 +1479,7 @@
> >   endif
> >   ifndef NO_GETTEXT
> >   ifndef LIBC_CONTAINS_LIBINTL
> >  -       EXTLIBS += -lintl
> >  +       EXTLIBS += -lintl -lcharset
> >   endif
> >   endif
> >   ifdef NEEDS_SOCKET
> 
> Thanks for this, but I think I have what might be a better solution.
> 
> I'm currently experimenting with adding CHARSET_LIB=-lcharset to
> MAKE_ENV in the ports Makefile (not work/git*/Makefile). Can you try
> setting that and let me know how it goes for you?

You mean like this?

LDFLAGS+=       -L${LOCALBASE}/lib
MAKE_ENV+=      LIBMD_SHA1=yes \
                V=1 \
                CHARSET_LIB=-lcharset
MAKE_ARGS+=     prefix="${PREFIX}"

Nope, sorry, all I got in the end was:

gcc  -O2 -pipe -I/usr/local/include -fno-strict-aliasing -I. 
-I/usr/local/include -I/usr/local/include -I/usr/include 
-DUSE_ST_TIMESPEC -DOLD_ICONV -pthread -DHAVE_PATHS_H 
-DHAVE_LIBCHARSET_H -DSHA1_HEADER='<openssl/sha.h>'  
-DFREAD_READS_DIRECTORIES -DDIR_HAS_BSD_GROUP_SEMANTICS -o git-shell 
-L/usr/local/lib -rpath=/usr/lib:/usr/local/lib  -L/usr/local/lib 
shell.o libgit.a xdiff/lib.a  -lz -lintl -L/usr/lib -R/usr/lib 
-lcrypto -pthread
libgit.a(gettext.o): In function `git_setup_gettext':
gettext.c:(.text+0x46): undefined reference to `locale_charset'
libgit.a(gettext.o): In function `git_setup_gettext':
gettext.c:(.text+0x46): undefined reference to `locale_charset'
libgit.a(gettext.o): In function `git_setup_gettext':
libgit.a(gettext.o)gettext.c:(.text+0x46): undefined reference to 
`locale_charset'
: In function `git_setup_gettext':
gettext.c:(.text+0x46): undefined reference to `locale_charset'
gmake: *** [git-shell] Error 1
gmake: *** Waiting for unfinished jobs....
gmake: *** [git-daemon] Error 1
gmake: *** [git-fast-import] Error 1
gmake: *** [git-imap-send] Error 1
*** Error code 1

Stop in /usr/ports/devel/git.
*** Error code 1

Stop in /usr/ports/devel/git.

I experimented with a virtual machine running a clean install of 
9.0-RELEASE amd64, upgraded to yesterday's 9.0-STABLE, and simply 
installed devel/git from ports. It all went smooth.

Looking at the differences, I noticed the virtual machine running Perl 
5.12.4, whereas enterprise, from where the above output originates, is 
running Perl 5.14.2. I doubt Perl having anything to do with this 
problem.

Just to be safe I'm spending some time at work this morning trying to 
figure out if indeed the choice of Perl has any impact.


Trond.

-- 
----------------------------------------------------------------------
Trond Endrestøl                     |     Trond.Endrestol@ximalas.info
ACM, NAS, NUUG, SAGE, USENIX        |   FreeBSD 9.0-S & re-Alpine 2.02
Comment 5 Trond Endrestøl 2012-04-26 09:33:44 UTC
On Mon, 23 Apr 2012 08:53+0200, Trond Endrestøl wrote:

> On Sun, 22 Apr 2012 14:18-0400, Wesley Shields wrote:
> 
> > On Sat, Apr 21, 2012 at 04:00:26PM +0000, Trond Endrest?l wrote:
> > > The following reply was made to PR ports/167071; it has been noted by GNATS.
> > > 
> > > From: =?ISO-8859-1?Q?Trond_Endrest=F8l?= <Trond.Endrestol@ximalas.info>
> > > To: bug-followup@FreeBSD.org, kientzle@FreeBSD.org
> > > Cc:  
> > > Subject: Re: ports/167071: devel/git 1.7.9.6 fails to link on FreeBSD/amd64
> > >  9.0-STABLE as of 2012-04-18
> > > Date: Sat, 21 Apr 2012 17:53:53 +0200 (CEST)
> > > 
> > >    This message is in MIME format.  The first part should be readable text,
> > >    while the remaining parts are likely unreadable without MIME-aware tools.
> > >  
> > >  --598627194-1920432307-1335023633=:1430
> > >  Content-Type: TEXT/PLAIN; charset=ISO-8859-1
> > >  Content-Transfer-Encoding: 8BIT
> > >  
> > >  Patch follows, store as devel/git/files/patch-Makefile2 or incorporate 
> > >  as you see fit into devel/git/files/patch-Makefile:
> > >  
> > >  --- Makefile.orig2      2012-04-21 17:34:38.723331000 +0200
> > >  +++ Makefile    2012-04-21 17:42:31.979651172 +0200
> > >  @@ -1479,7 +1479,7 @@
> > >   endif
> > >   ifndef NO_GETTEXT
> > >   ifndef LIBC_CONTAINS_LIBINTL
> > >  -       EXTLIBS += -lintl
> > >  +       EXTLIBS += -lintl -lcharset
> > >   endif
> > >   endif
> > >   ifdef NEEDS_SOCKET
> > 
> > Thanks for this, but I think I have what might be a better solution.
> > 
> > I'm currently experimenting with adding CHARSET_LIB=-lcharset to
> > MAKE_ENV in the ports Makefile (not work/git*/Makefile). Can you try
> > setting that and let me know how it goes for you?
> 
> You mean like this?
> 
> LDFLAGS+=       -L${LOCALBASE}/lib
> MAKE_ENV+=      LIBMD_SHA1=yes \
>                 V=1 \
>                 CHARSET_LIB=-lcharset
> MAKE_ARGS+=     prefix="${PREFIX}"
> 
> Nope, sorry, all I got in the end was:
> 
> gcc  -O2 -pipe -I/usr/local/include -fno-strict-aliasing -I. 
> -I/usr/local/include -I/usr/local/include -I/usr/include 
> -DUSE_ST_TIMESPEC -DOLD_ICONV -pthread -DHAVE_PATHS_H 
> -DHAVE_LIBCHARSET_H -DSHA1_HEADER='<openssl/sha.h>'  
> -DFREAD_READS_DIRECTORIES -DDIR_HAS_BSD_GROUP_SEMANTICS -o git-shell 
> -L/usr/local/lib -rpath=/usr/lib:/usr/local/lib  -L/usr/local/lib 
> shell.o libgit.a xdiff/lib.a  -lz -lintl -L/usr/lib -R/usr/lib 
> -lcrypto -pthread
> libgit.a(gettext.o): In function `git_setup_gettext':
> gettext.c:(.text+0x46): undefined reference to `locale_charset'
> libgit.a(gettext.o): In function `git_setup_gettext':
> gettext.c:(.text+0x46): undefined reference to `locale_charset'
> libgit.a(gettext.o): In function `git_setup_gettext':
> libgit.a(gettext.o)gettext.c:(.text+0x46): undefined reference to 
> `locale_charset'
> : In function `git_setup_gettext':
> gettext.c:(.text+0x46): undefined reference to `locale_charset'
> gmake: *** [git-shell] Error 1
> gmake: *** Waiting for unfinished jobs....
> gmake: *** [git-daemon] Error 1
> gmake: *** [git-fast-import] Error 1
> gmake: *** [git-imap-send] Error 1
> *** Error code 1
> 
> Stop in /usr/ports/devel/git.
> *** Error code 1
> 
> Stop in /usr/ports/devel/git.
> 
> I experimented with a virtual machine running a clean install of 
> 9.0-RELEASE amd64, upgraded to yesterday's 9.0-STABLE, and simply 
> installed devel/git from ports. It all went smooth.
> 
> Looking at the differences, I noticed the virtual machine running Perl 
> 5.12.4, whereas enterprise, from where the above output originates, is 
> running Perl 5.14.2. I doubt Perl having anything to do with this 
> problem.
> 
> Just to be safe I'm spending some time at work this morning trying to 
> figure out if indeed the choice of Perl has any impact.

Nope, choice of Perl had no impact.

Although I have specified the use of libiconv through make config, it 
appears it's not being linked:

On enterprise (amd64 9.0-STABLE world and custom kernel as of 
yesterday) without the local patch of Makefile (patch-Makefile2):

cc  -O2 -pipe -I/usr/local/include -fno-strict-aliasing -I. 
-I/usr/local/include -I/usr/local/include -I/usr/include                      
-DUSE_ST_TIMESPEC -DOLD_ICONV -pthread -DHAVE_PATHS_H 
-DHAVE_LIBCHARSET_H -DSHA1_HEADER='<openssl/sha.h>'  
-DFREAD_READS_DIRECTORIES -DDIR_HAS_BSD_GROUP_SEMANTICS -o git-shell 
-L/usr/local/lib -rpath=/usr/lib:/usr/local/lib  -L/usr/local/lib 
shell.o libgit.a xdiff/lib.a  -lz -lintl -L/usr/lib -R/usr/lib 
-lcrypto -pthread

On enterprise with the local patch of Makefile (patch-Makefile2):

cc  -O2 -pipe -I/usr/local/include -fno-strict-aliasing -I. 
-I/usr/local/include -I/usr/local/include -I/usr/include                      
-DUSE_ST_TIMESPEC -DOLD_ICONV -pthread -DHAVE_PATHS_H 
-DHAVE_LIBCHARSET_H -DSHA1_HEADER='<openssl/sha.h>'  
-DFREAD_READS_DIRECTORIES -DDIR_HAS_BSD_GROUP_SEMANTICS -o git-shell 
-L/usr/local/lib -rpath=/usr/lib:/usr/local/lib  -L/usr/local/lib 
shell.o libgit.a xdiff/lib.a  -lz -lintl -lcharset -L/usr/lib 
-R/usr/lib -lcrypto -pthread

On the virtual machine (i386 9.0-RELEASE GENERIC kernel, amd64 as a vm 
crashed too many times) with the same ports settings as on enterprise 
and no local patch of Makefile:

cc  -O2 -pipe -I/usr/local/include -fno-strict-aliasing -I. 
-I/usr/local/include -I/usr/local/include -I/usr/include 
-I/usr/local/include -DUSE_ST_TIMESPEC -DOLD_ICONV -pthread 
-DHAVE_PATHS_H -DHAVE_LIBCHARSET_H -DSHA1_HEADER='<openssl/sha.h>'  
-DFREAD_READS_DIRECTORIES -DDIR_HAS_BSD_GROUP_SEMANTICS -o git-shell 
-L/usr/local/lib -rpath=/usr/lib:/usr/local/lib  -L/usr/local/lib 
shell.o libgit.a xdiff/lib.a  -lz -L/usr/local/lib -R/usr/local/lib 
-liconv -lintl -L/usr/lib -R/usr/lib -lcrypto -pthread

Why is libiconv being linked on the virtual machine but not on 
enterprise? The kernel on enterprise has been iconv enabled, i.e.:

options         LIBICONV
options         CD9660_ICONV
options         MSDOSFS_ICONV
options         UDF_ICONV

Should this have any impact?

Both enterprise and the virtual machine have a file named 
/var/db/ports/git/options with exactly these lines and nothing more:

# This file is auto-generated by 'make config'.
# No user-servicable parts inside!
# Options for git-1.7.9.6
_OPTIONS_READ=git-1.7.9.6
WITHOUT_GUI=true
WITHOUT_SVN=true
WITHOUT_GITWEB=true
WITH_CONTRIB=true
WITH_P4=true
WITH_CVS=true
WITHOUT_HTMLDOCS=true
WITH_PERL=true
WITH_ICONV=true
WITH_CURL=true
WITH_ETCSHELLS=true


It's still a mystery,
Trond.

-- 
----------------------------------------------------------------------
Trond Endrestøl                     |     Trond.Endrestol@ximalas.info
ACM, NAS, NUUG, SAGE, USENIX        |   FreeBSD 9.0-S & re-Alpine 2.02
Comment 6 Trond Endrestøl 2012-04-26 12:01:53 UTC
On Thu, 26 Apr 2012 10:33+0200, Trond Endrestøl wrote:

> On Mon, 23 Apr 2012 08:53+0200, Trond Endrestøl wrote:
> 
> > On Sun, 22 Apr 2012 14:18-0400, Wesley Shields wrote:
> > 
> > > On Sat, Apr 21, 2012 at 04:00:26PM +0000, Trond Endrest?l wrote:
> > > > The following reply was made to PR ports/167071; it has been noted by GNATS.
> > > > 
> > > > From: =?ISO-8859-1?Q?Trond_Endrest=F8l?= <Trond.Endrestol@ximalas.info>
> > > > To: bug-followup@FreeBSD.org, kientzle@FreeBSD.org
> > > > Cc:  
> > > > Subject: Re: ports/167071: devel/git 1.7.9.6 fails to link on FreeBSD/amd64
> > > >  9.0-STABLE as of 2012-04-18
> > > > Date: Sat, 21 Apr 2012 17:53:53 +0200 (CEST)
> > > > 
> > > >    This message is in MIME format.  The first part should be readable text,
> > > >    while the remaining parts are likely unreadable without MIME-aware tools.
> > > >  
> > > >  --598627194-1920432307-1335023633=:1430
> > > >  Content-Type: TEXT/PLAIN; charset=ISO-8859-1
> > > >  Content-Transfer-Encoding: 8BIT
> > > >  
> > > >  Patch follows, store as devel/git/files/patch-Makefile2 or incorporate 
> > > >  as you see fit into devel/git/files/patch-Makefile:
> > > >  
> > > >  --- Makefile.orig2      2012-04-21 17:34:38.723331000 +0200
> > > >  +++ Makefile    2012-04-21 17:42:31.979651172 +0200
> > > >  @@ -1479,7 +1479,7 @@
> > > >   endif
> > > >   ifndef NO_GETTEXT
> > > >   ifndef LIBC_CONTAINS_LIBINTL
> > > >  -       EXTLIBS += -lintl
> > > >  +       EXTLIBS += -lintl -lcharset
> > > >   endif
> > > >   endif
> > > >   ifdef NEEDS_SOCKET
> > > 
> > > Thanks for this, but I think I have what might be a better solution.
> > > 
> > > I'm currently experimenting with adding CHARSET_LIB=-lcharset to
> > > MAKE_ENV in the ports Makefile (not work/git*/Makefile). Can you try
> > > setting that and let me know how it goes for you?
> > 
> > You mean like this?
> > 
> > LDFLAGS+=       -L${LOCALBASE}/lib
> > MAKE_ENV+=      LIBMD_SHA1=yes \
> >                 V=1 \
> >                 CHARSET_LIB=-lcharset
> > MAKE_ARGS+=     prefix="${PREFIX}"
> > 
> > Nope, sorry, all I got in the end was:
> > 
> > gcc  -O2 -pipe -I/usr/local/include -fno-strict-aliasing -I. 
> > -I/usr/local/include -I/usr/local/include -I/usr/include 
> > -DUSE_ST_TIMESPEC -DOLD_ICONV -pthread -DHAVE_PATHS_H 
> > -DHAVE_LIBCHARSET_H -DSHA1_HEADER='<openssl/sha.h>'  
> > -DFREAD_READS_DIRECTORIES -DDIR_HAS_BSD_GROUP_SEMANTICS -o git-shell 
> > -L/usr/local/lib -rpath=/usr/lib:/usr/local/lib  -L/usr/local/lib 
> > shell.o libgit.a xdiff/lib.a  -lz -lintl -L/usr/lib -R/usr/lib 
> > -lcrypto -pthread
> > libgit.a(gettext.o): In function `git_setup_gettext':
> > gettext.c:(.text+0x46): undefined reference to `locale_charset'
> > libgit.a(gettext.o): In function `git_setup_gettext':
> > gettext.c:(.text+0x46): undefined reference to `locale_charset'
> > libgit.a(gettext.o): In function `git_setup_gettext':
> > libgit.a(gettext.o)gettext.c:(.text+0x46): undefined reference to 
> > `locale_charset'
> > : In function `git_setup_gettext':
> > gettext.c:(.text+0x46): undefined reference to `locale_charset'
> > gmake: *** [git-shell] Error 1
> > gmake: *** Waiting for unfinished jobs....
> > gmake: *** [git-daemon] Error 1
> > gmake: *** [git-fast-import] Error 1
> > gmake: *** [git-imap-send] Error 1
> > *** Error code 1
> > 
> > Stop in /usr/ports/devel/git.
> > *** Error code 1
> > 
> > Stop in /usr/ports/devel/git.
> > 
> > I experimented with a virtual machine running a clean install of 
> > 9.0-RELEASE amd64, upgraded to yesterday's 9.0-STABLE, and simply 
> > installed devel/git from ports. It all went smooth.
> > 
> > Looking at the differences, I noticed the virtual machine running Perl 
> > 5.12.4, whereas enterprise, from where the above output originates, is 
> > running Perl 5.14.2. I doubt Perl having anything to do with this 
> > problem.
> > 
> > Just to be safe I'm spending some time at work this morning trying to 
> > figure out if indeed the choice of Perl has any impact.
> 
> Nope, choice of Perl had no impact.
> 
> Although I have specified the use of libiconv through make config, it 
> appears it's not being linked:
> 
> On enterprise (amd64 9.0-STABLE world and custom kernel as of 
> yesterday) without the local patch of Makefile (patch-Makefile2):
> 
> cc  -O2 -pipe -I/usr/local/include -fno-strict-aliasing -I. 
> -I/usr/local/include -I/usr/local/include -I/usr/include                      
> -DUSE_ST_TIMESPEC -DOLD_ICONV -pthread -DHAVE_PATHS_H 
> -DHAVE_LIBCHARSET_H -DSHA1_HEADER='<openssl/sha.h>'  
> -DFREAD_READS_DIRECTORIES -DDIR_HAS_BSD_GROUP_SEMANTICS -o git-shell 
> -L/usr/local/lib -rpath=/usr/lib:/usr/local/lib  -L/usr/local/lib 
> shell.o libgit.a xdiff/lib.a  -lz -lintl -L/usr/lib -R/usr/lib 
> -lcrypto -pthread
> 
> On enterprise with the local patch of Makefile (patch-Makefile2):
> 
> cc  -O2 -pipe -I/usr/local/include -fno-strict-aliasing -I. 
> -I/usr/local/include -I/usr/local/include -I/usr/include                      
> -DUSE_ST_TIMESPEC -DOLD_ICONV -pthread -DHAVE_PATHS_H 
> -DHAVE_LIBCHARSET_H -DSHA1_HEADER='<openssl/sha.h>'  
> -DFREAD_READS_DIRECTORIES -DDIR_HAS_BSD_GROUP_SEMANTICS -o git-shell 
> -L/usr/local/lib -rpath=/usr/lib:/usr/local/lib  -L/usr/local/lib 
> shell.o libgit.a xdiff/lib.a  -lz -lintl -lcharset -L/usr/lib 
> -R/usr/lib -lcrypto -pthread
> 
> On the virtual machine (i386 9.0-RELEASE GENERIC kernel, amd64 as a vm 
> crashed too many times) with the same ports settings as on enterprise 
> and no local patch of Makefile:
> 
> cc  -O2 -pipe -I/usr/local/include -fno-strict-aliasing -I. 
> -I/usr/local/include -I/usr/local/include -I/usr/include 
> -I/usr/local/include -DUSE_ST_TIMESPEC -DOLD_ICONV -pthread 
> -DHAVE_PATHS_H -DHAVE_LIBCHARSET_H -DSHA1_HEADER='<openssl/sha.h>'  
> -DFREAD_READS_DIRECTORIES -DDIR_HAS_BSD_GROUP_SEMANTICS -o git-shell 
> -L/usr/local/lib -rpath=/usr/lib:/usr/local/lib  -L/usr/local/lib 
> shell.o libgit.a xdiff/lib.a  -lz -L/usr/local/lib -R/usr/local/lib 
> -liconv -lintl -L/usr/lib -R/usr/lib -lcrypto -pthread
> 
> Why is libiconv being linked on the virtual machine but not on 
> enterprise? The kernel on enterprise has been iconv enabled, i.e.:
> 
> options         LIBICONV
> options         CD9660_ICONV
> options         MSDOSFS_ICONV
> options         UDF_ICONV
> 
> Should this have any impact?
> 
> Both enterprise and the virtual machine have a file named 
> /var/db/ports/git/options with exactly these lines and nothing more:
> 
> # This file is auto-generated by 'make config'.
> # No user-servicable parts inside!
> # Options for git-1.7.9.6
> _OPTIONS_READ=git-1.7.9.6
> WITHOUT_GUI=true
> WITHOUT_SVN=true
> WITHOUT_GITWEB=true
> WITH_CONTRIB=true
> WITH_P4=true
> WITH_CVS=true
> WITHOUT_HTMLDOCS=true
> WITH_PERL=true
> WITH_ICONV=true
> WITH_CURL=true
> WITH_ETCSHELLS=true

For some unknown reason, erecting MAKE_ENV isn't enough. Only by 
adding --with-iconv=${LOCALBASE} to CONFIGURE_ARGS was I able to 
compile git without any hiccups. It's very strange.

Here's patch for the ports' Makefile (i.e. 
/usr/ports/devel/git/Makefile):

--- Makefile.orig	2012-04-05 15:00:58.000000000 +0200
+++ Makefile	2012-04-26 12:48:35.885330108 +0200
@@ -249,10 +249,11 @@
 
 .ifdef (WITH_ICONV)
 USE_ICONV=	yes
 MAKE_ENV+=	NEEDS_LIBICONV=yes \
 		ICONVDIR=${LOCALBASE}
+CONFIGURE_ARGS+=	--with-iconv=${LOCALBASE}
 .else
 MAKE_ENV+=	NO_ICONV=1
 .endif
 
 .ifdef (WITH_CURL)

Some relevant files are available at 
http://ximalas.info/~trond/devel-git/20120426b/
Let me know if any other files are of interest.

Now, this issue might have been solved.

Trond.

-- 
----------------------------------------------------------------------
Trond Endrestøl                     |     Trond.Endrestol@ximalas.info
ACM, NAS, NUUG, SAGE, USENIX        |   FreeBSD 9.0-S & re-Alpine 2.02
Comment 7 Wesley Shields freebsd_committer freebsd_triage 2012-05-06 20:07:25 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 8 dfilter service freebsd_committer freebsd_triage 2012-05-06 20:07:27 UTC
wxs         2012-05-06 19:07:13 UTC

  FreeBSD ports repository

  Modified files:
    devel/git            Makefile distinfo pkg-plist 
  Log:
  Update to 1.7.10.1
  While here add iconv to CONFIGURE_ARGS to resolve build failures under
  certain conditions.[1]
  
  PR:             [1]: ports/167071
  Submitted by:   Trond Endrestøl <Trond.Endrestol@ximalas.info>
  
  Revision  Changes    Path
  1.136     +2 -1      ports/devel/git/Makefile
  1.98      +6 -6      ports/devel/git/distinfo
  1.100     +17 -0     ports/devel/git/pkg-plist
_______________________________________________
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"