Bug 58548 - devel/i386-rtems-gcc: fix libintl and libiconv depedencies => avoid conflicts with other ports
Summary: devel/i386-rtems-gcc: fix libintl and libiconv depedencies => avoid conflicts...
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: jeh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-26 02:40 UTC by Simon Barner
Modified: 2003-10-29 02:38 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (7.55 KB, patch)
2003-10-26 02:40 UTC, Simon Barner
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Barner 2003-10-26 02:40:09 UTC
Warning: I did not build the port since this would take several hours on
my slow machine. I created the patch by looking at the configure messages
and based on my experiences from fixing ~ 15 ports with similar 
problems.

In detail, this patch fixes the following issues: 
The port did not pick up the two libraries mentioned.

One possitive side effect of getting the libintl dependency right, is
that the port does not build its included version of the gettext library and
does not install those two .alias that were conflicting with other ports
(have a look at the pkg-plist diff and you'll see what I mean)
        
http://freebsd.rambler.ru/bsdmail/freebsd-ports_2003/msg08919.html
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2003-10-26 22:45:59 UTC
Responsible Changed
From-To: freebsd-ports-bugs->jeh

Over to maintainer.
Comment 2 jeh freebsd_committer freebsd_triage 2003-10-26 23:26:53 UTC
This does not build at all with your CONFIGURE_ENV at all.  It dies 
within the first few files.  I have tried several combinations and it 
does not work.

The dependancy on iconv is not necessary since gettext depends on it.

Jim
-- 
/"\   ASCII Ribbon Campaign  .
\ / - NO HTML/RTF in e-mail  .
  X  - NO Word docs in e-mail .
/ \ -----------------------------------------------------------------
jeh@FreeBSD.org      http://www.FreeBSD.org     The Power to Serve
jim@TheHousleys.Net  http://www.TheHousleys.net
---------------------------------------------------------------------
A Microsoft Certified Systems Engineer is to computing what
     a McDonalds Certified Food Specialist is to fine cuisine.
       -- Jack O'Neill
Comment 3 jeh freebsd_committer freebsd_triage 2003-10-26 23:27:15 UTC
State Changed
From-To: open->feedback

Patch does not work, and was not tested.
Comment 4 Simon Barner 2003-10-27 10:32:17 UTC
> This does not build at all with your CONFIGURE_ENV at all.  It dies 
> within the first few files.  I have tried several combinations and it 
> does not work.

Sorry, I should never have submitted an untested patch (well, in fact I
tested `make configure').

Let me point out the crucial line of the patch:
CFLAGS="${CFLAGS} -I. -I${LOCALBASE}/include -L${LOCALBASE}/lib"

-I. The original version of the patch failed because it used an include
file "options.h" from /usr/local/include instead of the one in the
current directory.

-I${LOCALBASE}/include -L${LOCALBASE}/lib" Without these options the
libintl and libiconv installations are not found.

Why did I put all that stuff into CFLAGS from the configure
environement?
Short answer: Because I could not find any other way to make it work.
Long answer: The compilation command line options during the build of
gcc are constructed in the following way:

xgcc <someoptions> <CONFIGURE_ENV's CFLAGS> <include options, etc.> \
   sourcefile.c -o sourcefile.o
   
Since <CONFIGURE_ENV's CFLAGS> contains -I/usr/local/include, the wrong
"options.h" was found and the build failed.

Unfortunatelly, the only way that I found to pass -L/usr/local/lib to the
linker was to abuse CFLAGS since LDFLAGS seem to be ignored.
 
> The dependancy on iconv is not necessary since gettext depends on it.

Fixed.

Here is the updated patch:

diff -ruN i386-rtems-gcc/Makefile i386-rtems-gcc.patched/Makefile
--- i386-rtems-gcc/Makefile	Tue Sep  2 02:25:29 2003
+++ i386-rtems-gcc.patched/Makefile	Mon Oct 27 11:09:08 2003
@@ -41,9 +41,11 @@
 		${LCLTARGET}-ld:${PORTSDIR}/devel/${LCLTARGET}-binutils
 RUN_DEPENDS=	${LCLTARGET}-as:${PORTSDIR}/devel/${LCLTARGET}-binutils \
 		${LCLTARGET}-ld:${PORTSDIR}/devel/${LCLTARGET}-binutils
+LIB_DEPENDS=	intl.5:${PORTSDIR}/devel/gettext
 
 PKGNAMEPREFIX=	${LCLTARGET}-
 USE_GMAKE=	yes
+USE_REINPLACE=	yes
 GNU_CONFIGURE=	yes
 ALL_TARGET=	all info
 NO_CPUCFLAGS=	yes
@@ -51,6 +53,9 @@
 CONFIGURE_TARGET?=	--target=${LCLTARGET}
 CONFIGURE_ARGS?=	--with-gnu-as --with-gnu-ld --with-newlib --verbose \
 			--enable-languages=c,c++
+CONFIGURE_ENV=		CFLAGS="${CFLAGS} -I. -I${LOCALBASE}/include -L${LOCALBASE}/lib" \
+			LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib"
+
 CONFIGURE_WRKSRC?=	${WRKDIR}/build-${LCLTARGET}
 CONFIGURE_SCRIPT?=	../${GCCNAME}/configure
 
@@ -69,6 +74,8 @@
 	cd ${GCCNAME} ; ${LN} -fs ../${NEWLIBNAME}/newlib . ; \
 	cd .. ; \
 	${MKDIR} build-${LCLTARGET})
+	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
+		${WRKSRC}/gcc/configure
 
 do-build:
 	@(cd ${WRKDIR}/build-${LCLTARGET} ; \
diff -ruN i386-rtems-gcc/files/patch-gcc::configure i386-rtems-gcc.patched/files/patch-gcc::configure
--- i386-rtems-gcc/files/patch-gcc::configure	Thu Jan  1 01:00:00 1970
+++ i386-rtems-gcc.patched/files/patch-gcc::configure	Mon Oct 27 11:08:20 2003
@@ -0,0 +1,22 @@
+--- gcc-3.2.1/gcc/configure.orig	Sun Oct 26 02:58:58 2003
++++ gcc-3.2.1/gcc/configure	Sun Oct 26 02:59:34 2003
+@@ -6013,7 +6013,7 @@
+   cat > conftest.$ac_ext <<EOF
+ #line 6015 "configure"
+ #include "confdefs.h"
+-#include <libintl.h>
++#include "%%LOCALBASE%%/include/libintl.h"
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+ { (eval echo configure:6020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+--- gcc-3.2.1/gcc/configure.orig	Sun Oct 26 02:58:58 2003
++++ gcc-3.2.1/gcc/configure	Sun Oct 26 02:59:34 2003
+@@ -6013,7 +6013,7 @@
+   cat > conftest.$ac_ext <<EOF
+ #line 6015 "configure"
+ #include "confdefs.h"
+-#include <libintl.h>
++#include "%%LOCALBASE%%/include/libintl.h"
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+ { (eval echo configure:6020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
diff -ruN i386-rtems-gcc/pkg-plist.arm-rtems i386-rtems-gcc.patched/pkg-plist.arm-rtems
--- i386-rtems-gcc/pkg-plist.arm-rtems	Fri Aug  8 15:53:59 2003
+++ i386-rtems-gcc.patched/pkg-plist.arm-rtems	Mon Oct 27 11:08:20 2003
@@ -214,7 +214,6 @@
 lib/gcc-lib/arm-rtems/3.2.1/thumb/crtend.o
 lib/gcc-lib/arm-rtems/3.2.1/thumb/crti.o
 lib/gcc-lib/arm-rtems/3.2.1/thumb/crtn.o
-lib/charset.alias
 share/locale/fr/LC_MESSAGES/gcc.mo
 share/locale/tr/LC_MESSAGES/gcc.mo
 share/locale/ja/LC_MESSAGES/gcc.mo
@@ -223,7 +222,6 @@
 share/locale/da/LC_MESSAGES/gcc.mo
 share/locale/el/LC_MESSAGES/gcc.mo
 share/locale/nl/LC_MESSAGES/gcc.mo
-share/locale/locale.alias
 arm-rtems/bin/gcc
 arm-rtems/bin/c++
 arm-rtems/bin/g++
diff -ruN i386-rtems-gcc/pkg-plist.i386-rtems i386-rtems-gcc.patched/pkg-plist.i386-rtems
--- i386-rtems-gcc/pkg-plist.i386-rtems	Fri Aug  8 15:53:59 2003
+++ i386-rtems-gcc.patched/pkg-plist.i386-rtems	Mon Oct 27 11:08:20 2003
@@ -235,7 +235,6 @@
 lib/gcc-lib/i386-rtems/3.2.1/athlon/libgcc.a
 lib/gcc-lib/i386-rtems/3.2.1/athlon/crtbegin.o
 lib/gcc-lib/i386-rtems/3.2.1/athlon/crtend.o
-lib/charset.alias
 share/locale/fr/LC_MESSAGES/gcc.mo
 share/locale/tr/LC_MESSAGES/gcc.mo
 share/locale/ja/LC_MESSAGES/gcc.mo
@@ -244,7 +243,6 @@
 share/locale/da/LC_MESSAGES/gcc.mo
 share/locale/el/LC_MESSAGES/gcc.mo
 share/locale/nl/LC_MESSAGES/gcc.mo
-share/locale/locale.alias
 i386-rtems/bin/gcc
 i386-rtems/bin/c++
 i386-rtems/bin/g++
diff -ruN i386-rtems-gcc/pkg-plist.i960-rtems i386-rtems-gcc.patched/pkg-plist.i960-rtems
--- i386-rtems-gcc/pkg-plist.i960-rtems	Fri Aug  8 15:53:59 2003
+++ i386-rtems-gcc.patched/pkg-plist.i960-rtems	Mon Oct 27 11:08:20 2003
@@ -221,7 +221,6 @@
 i960-rtems/lib/soft-float/libiberty.a
 i960-rtems/lib/libiberty.a
 lib/gcc-lib/i960-rtems/3.2.1/tradcpp0
-lib/charset.alias
 i960-rtems/lib/ld64/crt0.o
 i960-rtems/lib/ld64/libc.a
 i960-rtems/lib/ld64/libg.a
@@ -334,7 +333,6 @@
 share/locale/da/LC_MESSAGES/gcc.mo
 share/locale/el/LC_MESSAGES/gcc.mo
 share/locale/nl/LC_MESSAGES/gcc.mo
-share/locale/locale.alias
 @dirrm lib/gcc-lib/i960-rtems/3.2.1/include
 @dirrm lib/gcc-lib/i960-rtems/3.2.1/soft-float/ld64
 @dirrm lib/gcc-lib/i960-rtems/3.2.1/soft-float
diff -ruN i386-rtems-gcc/pkg-plist.m68k-rtems i386-rtems-gcc.patched/pkg-plist.m68k-rtems
--- i386-rtems-gcc/pkg-plist.m68k-rtems	Fri Aug  8 15:53:59 2003
+++ i386-rtems-gcc.patched/pkg-plist.m68k-rtems	Mon Oct 27 11:08:20 2003
@@ -250,7 +250,6 @@
 lib/gcc-lib/m68k-rtems/3.2.1/msoft-float/crti.o
 lib/gcc-lib/m68k-rtems/3.2.1/msoft-float/crtn.o
 lib/gcc-lib/m68k-rtems/3.2.1/msoft-float/libgcc.a
-lib/charset.alias
 share/locale/fr/LC_MESSAGES/gcc.mo
 share/locale/tr/LC_MESSAGES/gcc.mo
 share/locale/ja/LC_MESSAGES/gcc.mo
@@ -259,7 +258,6 @@
 share/locale/da/LC_MESSAGES/gcc.mo
 share/locale/el/LC_MESSAGES/gcc.mo
 share/locale/nl/LC_MESSAGES/gcc.mo
-share/locale/locale.alias
 m68k-rtems/bin/c++
 m68k-rtems/bin/g++
 m68k-rtems/bin/gcc
diff -ruN i386-rtems-gcc/pkg-plist.mips-rtems i386-rtems-gcc.patched/pkg-plist.mips-rtems
--- i386-rtems-gcc/pkg-plist.mips-rtems	Fri Aug  8 15:53:59 2003
+++ i386-rtems-gcc.patched/pkg-plist.mips-rtems	Mon Oct 27 11:08:20 2003
@@ -234,7 +234,6 @@
 lib/gcc-lib/mips-rtems/3.2.1/crtend.o
 lib/gcc-lib/mips-rtems/3.2.1/crti.o
 lib/gcc-lib/mips-rtems/3.2.1/crtn.o
-lib/charset.alias
 mips-rtems/bin/gcc
 mips-rtems/bin/c++
 mips-rtems/bin/g++
@@ -379,7 +378,6 @@
 share/locale/da/LC_MESSAGES/gcc.mo
 share/locale/el/LC_MESSAGES/gcc.mo
 share/locale/nl/LC_MESSAGES/gcc.mo
-share/locale/locale.alias
 @dirrm share/locale/el/LC_MESSAGES
 @dirrm share/locale/el
 @dirrm share/locale/nl/LC_MESSAGES
diff -ruN i386-rtems-gcc/pkg-plist.powerpc-rtems i386-rtems-gcc.patched/pkg-plist.powerpc-rtems
--- i386-rtems-gcc/pkg-plist.powerpc-rtems	Fri Aug  8 15:53:59 2003
+++ i386-rtems-gcc.patched/pkg-plist.powerpc-rtems	Mon Oct 27 11:08:20 2003
@@ -536,7 +536,6 @@
 lib/gcc-lib/powerpc-rtems/3.2.1/ecrtn.o
 lib/gcc-lib/powerpc-rtems/3.2.1/ncrtn.o
 lib/gcc-lib/powerpc-rtems/3.2.1/crtsavres.o
-lib/charset.alias
 share/locale/fr/LC_MESSAGES/gcc.mo
 share/locale/tr/LC_MESSAGES/gcc.mo
 share/locale/ja/LC_MESSAGES/gcc.mo
@@ -545,7 +544,6 @@
 share/locale/da/LC_MESSAGES/gcc.mo
 share/locale/el/LC_MESSAGES/gcc.mo
 share/locale/nl/LC_MESSAGES/gcc.mo
-share/locale/locale.alias
 powerpc-rtems/bin/c++
 powerpc-rtems/bin/g++
 powerpc-rtems/bin/gcc
diff -ruN i386-rtems-gcc/pkg-plist.sh-rtems i386-rtems-gcc.patched/pkg-plist.sh-rtems
--- i386-rtems-gcc/pkg-plist.sh-rtems	Fri Aug  8 15:53:59 2003
+++ i386-rtems-gcc.patched/pkg-plist.sh-rtems	Mon Oct 27 11:08:20 2003
@@ -216,7 +216,6 @@
 lib/gcc-lib/sh-rtems/3.2.1/m4-single-only/libgcc.a
 lib/gcc-lib/sh-rtems/3.2.1/m4-single/libgcc.a
 lib/gcc-lib/sh-rtems/3.2.1/m4/libgcc.a
-lib/charset.alias
 share/locale/fr/LC_MESSAGES/gcc.mo
 share/locale/tr/LC_MESSAGES/gcc.mo
 share/locale/ja/LC_MESSAGES/gcc.mo
@@ -225,7 +224,6 @@
 share/locale/da/LC_MESSAGES/gcc.mo
 share/locale/el/LC_MESSAGES/gcc.mo
 share/locale/nl/LC_MESSAGES/gcc.mo
-share/locale/locale.alias
 sh-rtems/bin/c++
 sh-rtems/bin/g++
 sh-rtems/bin/gcc
diff -ruN i386-rtems-gcc/pkg-plist.sparc-rtems i386-rtems-gcc.patched/pkg-plist.sparc-rtems
--- i386-rtems-gcc/pkg-plist.sparc-rtems	Fri Aug  8 15:53:59 2003
+++ i386-rtems-gcc.patched/pkg-plist.sparc-rtems	Mon Oct 27 11:08:20 2003
@@ -213,7 +213,6 @@
 lib/gcc-lib/sparc-rtems/3.2.1/soft/libgcc.a
 lib/gcc-lib/sparc-rtems/3.2.1/libgcc.a
 lib/gcc-lib/sparc-rtems/3.2.1/v8/libgcc.a
-lib/charset.alias
 share/locale/fr/LC_MESSAGES/gcc.mo
 share/locale/tr/LC_MESSAGES/gcc.mo
 share/locale/ja/LC_MESSAGES/gcc.mo
@@ -222,7 +221,6 @@
 share/locale/da/LC_MESSAGES/gcc.mo
 share/locale/el/LC_MESSAGES/gcc.mo
 share/locale/nl/LC_MESSAGES/gcc.mo
-share/locale/locale.alias
 sparc-rtems/bin/c++
 sparc-rtems/bin/g++
 sparc-rtems/bin/gcc
Comment 5 jeh freebsd_committer freebsd_triage 2003-10-29 02:37:20 UTC
State Changed
From-To: feedback->closed

Thanks for the patches, but I can't get them to work with gcc-3.2.3 which 
the port was updated to, but not committed, before the PR.