Opened 12 years ago

Closed 12 years ago

#37374 closed enhancement (invalid)

Trying to build a G95 snapshot

Reported by: angelo.graziosi@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: g95-snapshot Cc: tenomoto (Takeshi Enomoto)
Port: g95

Description

It seems that the development of G95 (http://www.g95.org) is restarted so I have tried to build current snapshot (http://ftp.g95.org/g95_source.tgz, 2012.12.19). I don't understand completely Portfile language but I have tried to follow this https://trac.macports.org/browser/trunk/dports/lang/g95/Portfile, and my steps have been:

wget ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.2.4/gcc-core-4.2.4.tar.gz

tar -xvf gcc-core-4.2.4.tar.gz

cd gcc-4.2.4

patch gcc/gcc.c /opt/local//var/macports/sources/rsync.macports.org/release/tarballs/ports/lang/g95/files/patch-gcc.c.diff

mkdir g95

cd g95

CC=llvm-gcc-4.2 ../configure --enable-languages=c --with-included-gettext --with-as=/usr/bin/as --with-ld=/usr/bin/ld --with-nm=/usr/bin/nm --build=x86_64-apple-darwin11 --host=x86_64-apple-darwin11

make

but 'make' fails:

llvm-gcc-4.2   -g -fkeep-inline-functions -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -fno-common   -DHAVE_CONFIG_H  -o xgcc gcc.o opts-common.o gcc-options.o gccspec.o \
	  intl.o prefix.o version.o driver-i386.o  ../libcpp/libcpp.a ./../intl/libintl.a -liconv  ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a
duplicate symbol _target_flags in:
    gcc.o
    gcc-options.o
ld: 1 duplicate symbol for architecture x86_64
collect2: ld returned 1 exit status
make[3]: *** [xgcc] Error 1
make[2]: *** [all-stage1-gcc] Error 2
make[1]: *** [stage1-bubble] Error 2
make: *** [all] Error 2

Have you any ideas how to fix this?

TIA,

Angelo.

Change History (2)

comment:1 Changed 12 years ago by angelo.graziosi@…

Oops... I have applied also this patch (for darwin.h), obviously,

cd gcc-4.2.4

patch gcc/gcc.c [...]

patch gcc/config/darwin.h /opt/local//var/macports/sources/rsync.macports.org/release/tarballs/ports/lang/g95/files/patch-darwin.h.diff

A.

comment:2 Changed 12 years ago by tenomoto (Takeshi Enomoto)

Resolution: invalid
Status: newclosed
Type: defectenhancement

I updated g95 to v0.93. I have no intention to follow snapshots. They have binaries if you need to use the snapshot. There are a number of changes required in order to successfully build g95. The ticket is to report a bug in Portfile, not to support how to build manually. You could learn how to write Portfile to find what changes are needed. A Tcl extension reinplace is used to edit files. See MacPorts Guide and Tcl documentation. Alternatively, modify Portfile to use the snapshot. You probably need to edit master_sites and checksum fields. You could use a local port tree. Since g95 port is relatively complicated, I would rather use v0.93 or the binary from the developer.

Note: See TracTickets for help on using tickets.