Opened 19 years ago

Closed 19 years ago

Last modified 8 years ago

#3433 closed defect (fixed)

pgplot build failure on 10.4 due to g77 dependency

Reported by: aips@… Owned by: blb@…
Priority: Normal Milestone:
Component: ports Version: 1.0
Keywords: Cc: Kai.Puolamaki@…
Port:

Description

As in http://bugzilla.opendarwin.org/show_bug.cgi?id=3174, the pgplot port depends on the g77 port and fails because g77 has been obsoleted by gcc34 or gcc40.

Wouldn't it be nice to update the dependencies for 10.4?

gcc40 also failed to build without an update from cvs, see #3432

I'm using darwinports 1.001 $ port version Version: 1.001

I had just done a clean install and cvs pull of darwinports, but hadn't done a cvsup or selfupdate.

I hacked on /opt/darwinports/dports/PortIndex and /opt/darwinports/dports/graphics/pgplot/ {Portfile,files/patch-sys_darwin_g77_gcc.conf} but could not prevent the port trying to build g77.

Change History (5)

comment:1 Changed 19 years ago by aips@…

After updating Portfile, and adding files/patch-sys_darwin_g77_gccdp34.conf, I got it to start building.

gfortran will not build pgplot, so the dependency should be on gcc34, not gcc40.

When building with gcc7-dp-34, it fails when trying to link to libcc_dynamic.

What I did is below. The errors are below that, and at the bottom the changes I made. The libcc_dynamic exists, and in the place one would expect; /usr/lib/libcc_dynamic.a It also fails even if I explicilty insert -L/usr/lib in files/patch-makemake and touch Portfile, to force a repatching.

$ cd /opt/darwinports/dports/graphics/pgplot
$ sudo port clean pgplot
$ sudo port -d -v checksum
$ sudo port -d -v extract
$ sudo port build -v -d

...busybusybusy...

g77-dp-3.4 -fno-backslash -Wimplicit -Wall -O -I/opt/local/include -o pgdemo1 ../examples/pgdemo1.f -L`pwd` -lpgplot -lcc_dynamic -lpng -lz -L/opt/local/lib -L/usr/X11R6/lib -lX11
/usr/bin/ld: can't locate file for: -lcc_dynamic
collect2: ld returned 1 exit status
make: *** [pgdemo1] Error 1
Error: Target com.apple.build returned: shell command "cd "/opt/local/var/db/dports/build/file._opt_darwinports_dports_graphics_pgplot/work/pgplot/build" && make all" returned error 2
Command output: gcc-dp-3.4 -c -Wall -DPG_PPU -O3 -I/opt/local/include -I. ../sys/grtermio.c
../sys/grtermio.c: In function `groter_':
../sys/grtermio.c:39: warning: implicit declaration of function `strncpy'
../sys/grtermio.c:48: warning: implicit declaration of function `open'
../sys/grtermio.c: In function `grcter_':
../sys/grtermio.c:63: warning: implicit declaration of function `close'
../sys/grtermio.c: In function `grwter_':
../sys/grtermio.c:77: warning: implicit declaration of function `write'
../sys/grtermio.c: In function `grpter_':
../sys/grtermio.c:132: warning: implicit declaration of function `read'
g77-dp-3.4 -c -Wimplicit -Wall -O -I/opt/local/include ../sys/grtrml.f
g77-dp-3.4 -c -Wimplicit -Wall -O -I/opt/local/include ../sys/grtter.f
gcc-dp-3.4 -c -Wall -DPG_PPU -O3 -I/opt/local/include -I. ../sys/gruser.c
ar ru libpgplot.a \
`ls pgarro.o pgask.o  pgaxis.o pgaxlg.o pgband.o pgbbuf.o pgbeg.o  pgbin.o  pgbox.o  pgbox1.o pgcirc.o pgcl.o   pgclos.o pgcn01.o pgcnsc.o pgconb.o pgconf.o pgconl.o pgcons.o pgcont.o pgconx.o pgcp.o   pgctab.o pgcurs.o pgdraw.o pgebuf.o pgend.o  pgenv.o  pgeras.o pgerr1.o pgerrb.o pgerrx.o pgerry.o pgetxt.o pgfunt.o pgfunx.o pgfuny.o pggray.o pghi2d.o pghis1.o pghist.o pghtch.o pgiden.o pgimag.o pginit.o pglab.o  pglcur.o pgldev.o pglen.o  pgline.o pgmove.o pgmtxt.o pgncur.o pgnoto.o pgnpl.o  pgnumb.o pgolin.o pgopen.o pgpage.o pgpanl.o pgpap.o  pgpixl.o pgpnts.o pgpoly.o pgpt.o   pgpt1.o  pgptxt.o pgqah.o  pgqcf.o  pgqch.o  pgqci.o  pgqcir.o pgqclp.o pgqcol.o pgqcr.o  pgqcs.o  pgqdt.o  pgqfs.o  pgqhs.o  pgqid.o  pgqinf.o pgqitf.o pgqls.o  pgqlw.o  pgqndt.o pgqpos.o pgqtbg.o pgqtxt.o pgqvp.o  pgqvsz.o pgqwin.o pgrect.o pgrnd.o  pgrnge.o pgsah.o  pgsave.o pgscf.o  pgsch.o  pgsci.o  pgscir.o pgsclp.o pgscr.o  pgscrl.o pgscrn.o pgsfs.o  pgshls.o pgshs.o  pgsitf.o pgslct.o pgsls.o  pgslw.o  pgstbg.o pgsubp.o pgsvp.o  pgswin.o pgtbox.o pgtext.o pgtick.o pgtikl.o pgupdt.o pgvect.o pgvsiz.o pgvstd.o pgvw.o   pgwedg.o pgwnad.o \
        pgadvance.o pgbegin.o   pgcurse.o   pglabel.o   pgmtext.o   pgncurse.o  pgpaper.o   pgpoint.o   pgptext.o   pgvport.o   pgvsize.o   pgvstand.o  pgwindow.o  grarea.o grbpic.o grchsz.o grclip.o grclos.o grclpl.o grctoi.o grcurs.o grdot0.o grdot1.o grdtyp.o gresc.o  grepic.o gretxt.o grfa.o   grfao.o  grgfil.o grgray.o grimg0.o grimg1.o grimg2.o grimg3.o grinit.o gritoc.o grlen.o  grlin0.o grlin1.o grlin2.o grlin3.o grlina.o grmcur.o grmker.o grmova.o grmsg.o gropen.o grpage.o grpars.o grpixl.o grpocl.o grprom.o grpxpo.o grpxps.o grpxpx.o grpxre.o grqcap.o grqci.o  grqcol.o grqcr.o  grqdev.o grqdt.o  grqfnt.o grqls.o  grqlw.o  grqpos.o grqtxt.o grqtyp.o grquit.o grrec0.o grrect.o grsci.o  grscr.o  grscrl.o grsetc.o grsets.o grsfnt.o grsize.o grskpb.o grslct.o grsls.o  grslw.o  grsyds.o grsymk.o grsyxd.o grterm.o grtext.o grtoup.o grtrim.o grtrn0.o grtxy0.o grvct0.o grwarn.o grxhls.o grxrgb.o grexec.o \
        gidriv.o lxdriv.o nudriv.o pndriv.o psdriv.o  grdate.o grfileio.o grflun.o grgcom.o grgenv.o grgetc.o grglun.o grgmem.o grgmsg.o grlgtr.o groptx.o grsy00.o grtermio.o grtrml.o grtter.o gruser.o | sort | uniq`
ar: creating archive libpgplot.a
ranlib libpgplot.a
g77-dp-3.4 -Wimplicit -Wall -O -I/opt/local/include -o pgpack ../fonts/pgpack.f
/usr/bin/ld: warning prebinding disabled because dependent library: /opt/local/lib/gcc-3.4/libg2c.0.dylib is not prebound
rm -f grfont.dat
./pgpack <../fonts/grfont.txt
 Characters defined:   996
 Array cells used:   26732
rm -f pgpack
g77-dp-3.4 -fno-backslash -Wimplicit -Wall -O -I/opt/local/include -o pgdemo1 ../examples/pgdemo1.f -L`pwd` -lpgplot -lcc_dynamic -lpng -lz -L/opt/local/lib -L/usr/X11R6/lib -lX11
/usr/bin/ld: can't locate file for: -lcc_dynamic
collect2: ld returned 1 exit status
make: *** [pgdemo1] Error 1

Warning: the following items did not execute (for pgplot): com.apple.build
$
--- Portfile.orig       2005-06-11 18:48:25.000000000 +1000
+++ Portfile    2005-06-12 10:08:07.000000000 +1000
@@ -25,7 +25,7 @@
 
 checksums                      md5 e8a6e8d0d5ef9d1709dfb567724525ae
 
-depends_lib                    lib:libpng:libpng lib:libz:zlib bin:g77:g77
+depends_lib                    lib:libpng:libpng lib:libz:zlib bin:gcc34:gcc34
 
 patchfiles                     patch-makemake patch-src_grgfil.f patch-drivers.list \
                                        patch-pgdispd_proccom.c
@@ -82,12 +82,12 @@
        global ppMakeMakeTarget
        set ppMakeMakeTarget    darwin
        patchfiles-append               patch-sys_darwin_aaaread.me \
-                                                       patch-sys_darwin_g77_gcc.conf
+                                                       patch-sys_darwin_g77_gccdp34.conf
        post-patch {
                reinplace "s|@@PREFIX@@|${prefix}|g" \
-                       ${worksrcpath}/../sys_darwin/g77_gcc.conf
+                       ${worksrcpath}/../sys_darwin/g77_gccdp34.conf
                reinplace "s|@@X11PREFIX@@|${x11prefix}|g" \
-                       ${worksrcpath}/../sys_darwin/g77_gcc.conf
+                       ${worksrcpath}/../sys_darwin/g77_gccdp34.conf
        }
 }
--- ../sys_darwin/g77_gccdp34.conf.orig Wed Dec 31 17:00:00 1969
+++ ../sys_darwin/g77_gccdp34.conf      Mon May 17 17:25:36 2004
@@ -0,0 +1,143 @@
+# The GNU g77 FORTRAN compiler and Gnu gcc C compiler on Darwin.
+#-----------------------------------------------------------------------
+
+# Optional: Needed by XWDRIV (/xwindow and /xserve) and
+#           X2DRIV (/xdisp and /figdisp).
+# The arguments needed by the C compiler to locate X-window include files.
+ 
+   XINCL="-I@@X11PREFIX@@/include"
+
+# Optional: Needed by XMDRIV (/xmotif).
+# The arguments needed by the C compiler to locate Motif, Xt and
+# X-window include files.
+ 
+   MOTIF_INCL=""
+
+# Optional: Needed by XADRIV (/xathena).
+# The arguments needed by the C compiler to locate Xaw, Xt and
+# X-window include files.
+ 
+ 
+   ATHENA_INCL=""
+
+# Optional: Needed by TKDRIV (/xtk).
+# The arguments needed by the C compiler to locate Tcl, Tk and
+# X-window include files.
+ 
+   TK_INCL=""
+
+# Optional: Needed by RVDRIV (/xrv).
+# The arguments needed by the C compiler to locate Rivet, Tcl, Tk and
+# X-window include files.
+ 
+   RV_INCL=""
+
+# Mandatory.
+# The FORTRAN compiler to use.
+ 
+   FCOMPL="g77-dp-3.4"
+
+# Mandatory.
+# The FORTRAN compiler flags to use when compiling the pgplot library.
+# (NB. makemake prepends -c to $FFLAGC where needed)
+ 
+   FFLAGC="-Wimplicit -Wall -O -I@@PREFIX@@/include"
+
+# Mandatory.
+# The FORTRAN compiler flags to use when compiling fortran demo programs.
+# This may need to include a flag to tell the compiler not to treat
+# backslash characters as C-style escape sequences
+ 
+   FFLAGD="-fno-backslash $FFLAGC"
+
+# Mandatory.
+# The C compiler to use.
+ 
+   CCOMPL="gcc-dp-3.4"
+
+# Mandatory.
+# The C compiler flags to use when compiling the pgplot library.
+ 
+   CFLAGC="-Wall -DPG_PPU -O3 -I@@PREFIX@@/include"
+
+# Mandatory.
+# The C compiler flags to use when compiling C demo programs.
+ 
+   CFLAGD="$CFLAGC"
+
+# Optional: Only needed if the cpgplot library is to be compiled.
+# The flags to use when running pgbind to create the C pgplot wrapper
+# library. (See pgplot/cpg/pgbind.usage)
+ 
+   PGBIND_FLAGS="bsd"
+
+# Mandatory.
+# The library-specification flags to use when linking normal pgplot
+# demo programs.
+ 
+   LIBS="-L@@PREFIX@@/lib -L@@X11PREFIX@@/lib -lX11"
+
+# Optional: Needed by XMDRIV (/xmotif).
+# The library-specification flags to use when linking motif
+# demo programs.
+ 
+   MOTIF_LIBS=""
+
+# Optional: Needed by XADRIV (/xathena).
+# The library-specification flags to use when linking athena
+# demo programs.
+ 
+   ATHENA_LIBS=""
+
+# Optional: Needed by TKDRIV (/xtk).
+# The library-specification flags to use when linking Tk demo programs.
+# Note that you may need to append version numbers to -ltk and -ltcl.
+ 
+   TK_LIBS=""
+
+# Mandatory.
+# On systems that have a ranlib utility, put "ranlib" here. On other
+# systems put ":" here (Colon is the Bourne-shell do-nothing command).
+ 
+   RANLIB="ranlib"
+
+# Optional: Needed on systems that support shared libraries.
+# The name to give the shared pgplot library.
+ 
+   SHARED_LIB=""
+
+# Optional: Needed if SHARED_LIB is set.
+# How to create a shared library from a trailing list of object files.
+ 
+   SHARED_LD=""
+
+# Optional:
+# On systems such as Solaris 2.x, that allow specification of the
+# libraries that a shared library needs to be linked with when a
+# program that uses it is run, this variable should contain the
+# library-specification flags used to specify these libraries to
+# $SHARED_LD
+ 
+   SHARED_LIB_LIBS=""
+
+# Optional:
+# Compiler name used on Next systems to compile objective-C files.
+ 
+   MCOMPL=""
+
+# Optional:
+# Compiler flags used with MCOMPL when compiling objective-C files.
+ 
+   MFLAGC=""
+
+# Optional: (Actually mandatory, but already defined by makemake).
+# Where to look for any system-specific versions of the files in
+# pgplot/sys. Before evaluating this script, makemake sets SYSDIR to
+# /wherever/pgplot/sys_$OS, where $OS is the operating-system name
+# given by the second command-line argument of makemake. If the
+# present configuration is one of many for this OS, and it needs
+# different modifications to files in pgplot/sys than the other
+# configurations, then you should create a subdirectory of SYSDIR,
+# place the modified files in it and change the following line to
+# $SYSDIR="$SYSDIR/subdirectory_name".
+ 
+   SYSDIR="$SYSDIR"
--- files/patch-makemake.orig   2005-06-12 10:41:43.000000000 +1000
+++ files/patch-makemake        2005-06-12 10:41:59.000000000 +1000
@@ -6,8 +6,8 @@
  
 -PGPLOT_LIB="-L\`pwd\` -lpgplot"
 -CPGPLOT_LIB="-L\`pwd\` -lcpgplot -lpgplot"
-+PGPLOT_LIB="-L\`pwd\` -lpgplot -lcc_dynamic"
-+CPGPLOT_LIB="-L\`pwd\` -lcpgplot -lpgplot -lcc_dynamic"
++PGPLOT_LIB="-L\`pwd\` -lpgplot -L/usr/lib -lcc_dynamic"
++CPGPLOT_LIB="-L\`pwd\` -lcpgplot -lpgplot -L/usr/lib -lcc_dynamic"
  
  # List the default make targets.
  
Last edited 8 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:2 Changed 19 years ago by aips@…

I checked once more for /usr/lib/libcc_dynamic.a
It doesn't exist any more. I tried to reinstall it, by uninstalling and reinstalling all of Xcode2.0.
It appeared during the OS X SDK step, but then disappeared again.
It was pointing to /usr/lib/gcc/default/libgcc.a which does not exist either;

$ ls -lt /usr/lib/gcc
total 0
drwxr-xr-x   4 root  wheel  136 Jun 12 12:33 darwin
drwxr-xr-x   3 root  wheel  102 Mar 28 13:40 powerpc-apple-darwin8
$ ls -lt /usr/lib/gcc/darwin/
total 8
lrwxr-xr-x   1 root  wheel    3 Jun 12 12:29 3.3-fast -> 3.3
drwxr-xr-x   8 root  wheel  272 Mar 28 13:40 3.3
$ ls -lt /usr/lib/gcc/powerpc-apple-darwin8/
total 0
drwxr-xr-x   15 root  wheel  510 Mar 28 13:40 4.0.0

WTF!???

Last edited 8 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:3 Changed 19 years ago by jmpp@…

Owner: changed from darwinports-bugs@… to blb@…

comment:4 Changed 19 years ago by Kai.Puolamaki@…

Cc: Kai.Puolamaki@… added

comment:5 Changed 19 years ago by blb@…

Resolution: fixed
Status: newclosed

pgplot updated to use gcc34's F77 compiler (the libcc_dynamic was a fix which is obviously unneeded now). Thanks for the report and patches.

Note: See TracTickets for help on using tickets.