On Sat, Nov 12, 2011 at 6:11 PM, Hanfeng Qin <hanfengt...@gmail.com> wrote:
> Hello all,
> I downloaded open64-5.0 and met a compiling error as follows:
> -------
> GEN    compiler_build_date.c
> C
> /home/hanfeng/Workspace/tools/build-open64/osprey/targdir/crayf90/sgi/compil
> er_build_date.c
> LD
> /home/hanfeng/Workspace/tools/build-open64/osprey/targdir/crayf90/sgi/mfef95
> /usr/bin/ld: cannot find -lgfortran
> collect2: ld returned 1 exit status
> make[4]: *** [mfef95] Error 1
> make[3]: *** [default] Error 2
> make[2]: *** [first] Error 2
> make[2]: Leaving directory
> `/home/hanfeng/Workspace/tools/build-open64/osprey/targdir/crayf90'
> make[1]: *** [mfef95] Error 2
> make[1]: Leaving directory `/home/hanfeng/Workspace/tools/build-open64'
> make: *** [build] Error 2
> -------
> The version of gcc in my platform is 4.6.2 (actually, I work on Fedora 16,
> x86_64). I also checked the related development packages:
> $ rpm -qa | grep gfortran
> libgfortran-4.6.2-1.fc16.i686
> gcc-gfortran-4.6.2-1.fc16.x86_64
> libgfortran-4.6.2-1.fc16.x86_64
>
> Can anyone give my some suggestions to conquer that?
>

I also encounter this problem in my Fedora 16 x86_64 and i686 systems.
But on CentOS 6.0 x86_64 and i686 systems, there are no problem.

My research show that the gcc-4.6.2 package of Fedora 16 has problem.

When I build and install gcc-4.6.2 from source, the problem disappear.
On Fedora 16 i686, open64 trunck r3826 can then be built completely.
But on Fedora 16 x86_64, there still remain one problem:

nown-linux-gnu-build/osprey/../../open64-src/osprey/libfi/mathlb/iso_c_binding_support.c
C      
/mnt/o/open64-linux-Release/open64-x86_64-unknown-linux-gnu-build/osprey/targdir_lib/libfortran//mnt/o/open64-linux-Release/open64-x86_64-unknown-linux-gnu-build/osprey/../../open64-src/osprey/libfi/mathlb/ieee_module_support.c
/tmp/ccspin#.z6TQTJ.s: Assembler messages:
/tmp/ccspin#.z6TQTJ.s:1662: Error: bad register name `%st2'
/tmp/ccspin#.z6TQTJ.s:1732: Error: operand type mismatch for `divss'
make[3]: *** [ieee_module_support.o] Error 1
make[2]: *** [default] Error 2
make[1]: *** [libfortran] Error 2
make[1]: Leaving directory
`/mnt/o/open64-linux-Release/open64-x86_64-unknown-linux-gnu-build/osprey/targdir_lib'
make: *** [lib] Error 2

gcc-4.6.2 + binutils-2.22, gcc-4.5.3 + binutils-2.20.90, gcc-4.4.6 +
binutils-2.20.90 all do not work.

So, I just specify --disable-fortran on Fedora 16 x86_64.


Below is my investigation(self explained):

Fedora 16's own gcc-4.6.2 doesn't work

yum list '*gfortran*'

gcc-gfortran.i686 gcc-gfortran.x86_64 libgfortran.i686
libgfortran.x86_64 libgfortran-static.x86_64

yum install  'gcc-gfortran.i686' 'libgfortran.i686' 'libgfortran-static'

[xch@localhost Documents]$ rpm -qf
/usr/lib/gcc/x86_64-redhat-linux/4.6.2/libgfortran.a
libgfortran-static-4.6.2-1.fc16.x86_64
[xch@localhost Documents]$ gfortran -m32 --print-file-name=libgfortran.a
/usr/lib/gcc/x86_64-redhat-linux/4.6.2/libgfortran.a
[xch@localhost Documents]$ gfortran -m32 --print-file-name=libgfortran.so
/usr/lib/gcc/x86_64-redhat-linux/4.6.2/32/libgfortran.so





[xch@localhost Documents]$ rpm -ql libgfortran.i686
/usr/lib/libgfortran.so.3
/usr/lib/libgfortran.so.3.0.0
[xch@localhost Documents]$ rpm -ql libgfortran.x86_64
/usr/lib64/libgfortran.so.3
/usr/lib64/libgfortran.so.3.0.0
[xch@localhost Documents]$ rpm -ql libgfortran-static.x86_64
/usr/lib/gcc
/usr/lib/gcc/x86_64-redhat-linux
/usr/lib/gcc/x86_64-redhat-linux/4.6.2
/usr/lib/gcc/x86_64-redhat-linux/4.6.2/libgfortran.a

[xch@localhost Documents]$ rpm -ql gcc-gfortran.i686
/usr/bin/f95
/usr/bin/gfortran
/usr/lib/gcc
/usr/lib/gcc/i686-redhat-linux
/usr/lib/gcc/i686-redhat-linux/4.6.2
/usr/lib/gcc/i686-redhat-linux/4.6.2/finclude
/usr/lib/gcc/i686-redhat-linux/4.6.2/finclude/omp_lib.f90
/usr/lib/gcc/i686-redhat-linux/4.6.2/finclude/omp_lib.h
/usr/lib/gcc/i686-redhat-linux/4.6.2/finclude/omp_lib.mod
/usr/lib/gcc/i686-redhat-linux/4.6.2/finclude/omp_lib_kinds.mod
/usr/lib/gcc/i686-redhat-linux/4.6.2/libgfortran.so
/usr/lib/gcc/i686-redhat-linux/4.6.2/libgfortran.spec
/usr/lib/gcc/i686-redhat-linux/4.6.2/libgfortranbegin.a
/usr/libexec/gcc
/usr/libexec/gcc/i686-redhat-linux
/usr/libexec/gcc/i686-redhat-linux/4.6.2
/usr/libexec/gcc/i686-redhat-linux/4.6.2/f951
/usr/share/doc/gcc-gfortran-4.6.2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog-2002.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog-2002.libgfortran.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog-2003.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog-2003.libgfortran.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog-2004.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog-2004.libgfortran.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog-2005.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog-2005.libgfortran.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog-2006.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog-2006.libgfortran.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog-2007.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog-2007.libgfortran.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog-2008.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog-2008.libgfortran.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog-2009.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog-2009.libgfortran.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog-2010.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog-2010.libgfortran.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog.libgfortran.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog.ptr.bz2
/usr/share/info/gfortran.info.gz
/usr/share/man/man1/gfortran.1.gz


[xch@localhost Documents]$ rpm -ql gcc-gfortran.x86_64
/usr/bin/f95
/usr/bin/gfortran
/usr/lib/gcc
/usr/lib/gcc/x86_64-redhat-linux
/usr/lib/gcc/x86_64-redhat-linux/4.6.2
/usr/lib/gcc/x86_64-redhat-linux/4.6.2/32
/usr/lib/gcc/x86_64-redhat-linux/4.6.2/32/libgfortran.a
/usr/lib/gcc/x86_64-redhat-linux/4.6.2/32/libgfortran.so
/usr/lib/gcc/x86_64-redhat-linux/4.6.2/32/libgfortranbegin.a
/usr/lib/gcc/x86_64-redhat-linux/4.6.2/finclude
/usr/lib/gcc/x86_64-redhat-linux/4.6.2/finclude/omp_lib.f90
/usr/lib/gcc/x86_64-redhat-linux/4.6.2/finclude/omp_lib.h
/usr/lib/gcc/x86_64-redhat-linux/4.6.2/finclude/omp_lib.mod
/usr/lib/gcc/x86_64-redhat-linux/4.6.2/finclude/omp_lib_kinds.mod
/usr/lib/gcc/x86_64-redhat-linux/4.6.2/libgfortran.so
/usr/lib/gcc/x86_64-redhat-linux/4.6.2/libgfortran.spec
/usr/lib/gcc/x86_64-redhat-linux/4.6.2/libgfortranbegin.a
/usr/libexec/gcc
/usr/libexec/gcc/x86_64-redhat-linux
/usr/libexec/gcc/x86_64-redhat-linux/4.6.2
/usr/libexec/gcc/x86_64-redhat-linux/4.6.2/f951
/usr/share/doc/gcc-gfortran-4.6.2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog-2002.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog-2002.libgfortran.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog-2003.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog-2003.libgfortran.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog-2004.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog-2004.libgfortran.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog-2005.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog-2005.libgfortran.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog-2006.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog-2006.libgfortran.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog-2007.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog-2007.libgfortran.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog-2008.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog-2008.libgfortran.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog-2009.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog-2009.libgfortran.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog-2010.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog-2010.libgfortran.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog.libgfortran.bz2
/usr/share/doc/gcc-gfortran-4.6.2/ChangeLog.ptr.bz2
/usr/share/info/gfortran.info.gz
/usr/share/man/man1/gfortran.1.gz


After I rebuild gcc-4.6.2 from source:

[xch@localhost Documents]$ gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.6.2/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-src/configure --prefix=/usr/local
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-linker-build-id
--enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto
--enable-plugin --enable-java-awt=gtk --disable-dssi
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--disable-libjava-multilib --with-tune=generic --with-arch_32=i686
--build=x86_64-unknown-linux-gnu
Thread model: posix
gcc version 4.6.2 (GCC)
[xch@localhost Documents]$ gfortran -m32 --print-file-name=libgfortran.a
/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../lib/libgfortran.a
[xch@localhost Documents]$ gfortran -m32 --print-file-name=libgfortran.so
/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../lib/libgfortran.so







By the way, on Fedora 16 x86_64, build gcc-4.6.2 require some other packages:

yum -v -y  install  gmp gmp-devel mpfr mpfr-devel libmpc libmpc-devel \
                    ppl ppl-devel cloog-ppl cloog-ppl-devel \
                    ecj  \
                    libtool-ltdl libtool-ltdl-devel \
                    expect dejagnu guile autogen

yum -v -y  install  binutils glibc-static zlib-devel gettext dejagnu
bison flex texinfo sharutils systemtap-sdt-devel \
                    gdb ecj zip unzip gcc-java libgcj glibc-devel
elfutils-devel elfutils-libelf-devel gcc-gnat libgnat \
                    libunwind \
                    ppl ppl-devel cloog-ppl cloog-ppl-devel \
                    doxygen graphviz \
                    gmp-devel mpfr-devel libmpc-devel \


yum -v -y  install  'glibc*.i686' 'glibc*.x86_64'
yum -v -y  install  'xorg-x11*.i686' 'xorg-x11*.x86_64'
yum -v -y  install  'mesa*.i686' 'mesa*.x86_64'
yum -v -y  install  'libX*.i686' 'libX*.x86_64'
yum -v -y  install  'gtk2*.i686' 'gtk2*.x86_64' \
                    'gtk+*.i686' 'gtk+*.x86_64' \
                    'gtk3*.i686' 'gtk3*.x86_64'
yum -v -y  install  'libgcj*.i686' 'libgcj*.x86_64' 'libgcj*'

yum -v -y  install  'java-1.5.0-gcj*.i686' 'java-1.5.0-gcj*.x86_64'
'java-1.5.0-gcj*'
yum -v -y  install  'java*.i686' 'java*.x86_64' 'java*'



Attached file is my build scripts of gcc, open64, x86_open64.

-- 
Chiheng Xu

Attachment: build-scripts.tar.bz2
Description: BZip2 compressed data

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel

Reply via email to