Opened 13 years ago

Closed 13 years ago

#30013 closed update (fixed)

update root to 5.30.00

Reported by: cjones051073 (Chris Jones) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch maintainer Cc: mattiafrancescomoro@…, mf2k (Frank Schima)
Port: root

Description

Hi,

The attached unified diff updates the Portfile for root to the latest production release, v5.30.00

There is though a problem with the gfortran variant, which fails during the destroot stage

:debug:destroot destroot phase started at Sun Jul  3 12:17:37 BST 2011
:debug:destroot Executing org.macports.destroot (root)
:debug:destroot Environment: CPATH='/opt/local/include' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_portfiles_science_root/work/.CC_PRINT_OPTIONS' LIBRARY_PATH='/opt/local/lib' CC_PRINT_OPTIONS='YES' MACOSX_DEPLOYMENT_TARGET='10.6'
:debug:destroot Assembled command: 'cd "/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_portfiles_science_root/work/root" && /usr/bin/make install DESTDIR=/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_portfiles_science_root/work/destroot'
:info:destroot cp /opt/local/var/macports/build/_Users_chris_Projects_MacPorts_portfiles_science_root/work/root/hist/hbook/inc/THbookBranch.h include/THbookBranch.h
:info:destroot cp /opt/local/var/macports/build/_Users_chris_Projects_MacPorts_portfiles_science_root/work/root/hist/hbook/inc/THbookFile.h include/THbookFile.h
:info:destroot cp /opt/local/var/macports/build/_Users_chris_Projects_MacPorts_portfiles_science_root/work/root/hist/hbook/inc/THbookKey.h include/THbookKey.h
:info:destroot cp /opt/local/var/macports/build/_Users_chris_Projects_MacPorts_portfiles_science_root/work/root/hist/hbook/inc/THbookTree.h include/THbookTree.h
:info:destroot bin/rmkdepend -R -fmisc/minicern/src/cernlib.d -Y -w 1000 -- -m64 -pipe -Wshadow -W -Wall -fsigned-char -fno-common -Iinclude -DR__HAVE_CONFIG   -pthread -- /opt/local/var/macports/build/_Users_chris_Projects_MacPorts_portfiles_science_root/work/root/misc/minicern/src/cernlib.c
:info:destroot /usr/bin/gcc-4.2 -O2 -m64 -pipe -Wshadow -W -Wall -fsigned-char -fno-common -Iinclude -DR__HAVE_CONFIG   -pthread -o misc/minicern/src/cernlib.o -c /opt/local/var/macports/build/_Users_chris_Projects_MacPorts_portfiles_science_root/work/root/misc/minicern/src/cernlib.c
:info:destroot gfortran-mp-4.4 -O2 -m64 -std=legacy -o misc/minicern/src/hbook.o -c /opt/local/var/macports/build/_Users_chris_Projects_MacPorts_portfiles_science_root/work/root/misc/minicern/src/hbook.f
:info:destroot gfortran-mp-4.4 -O2 -m64 -std=legacy -o misc/minicern/src/kernlib.o -c /opt/local/var/macports/build/_Users_chris_Projects_MacPorts_portfiles_science_root/work/root/misc/minicern/src/kernlib.f
:info:destroot gfortran-mp-4.4 -O2 -m64 -std=legacy -o misc/minicern/src/zebra.o -c /opt/local/var/macports/build/_Users_chris_Projects_MacPorts_portfiles_science_root/work/root/misc/minicern/src/zebra.f
:info:destroot g++ -dynamiclib -single_module -undefined dynamic_lookup -install_name /opt/local/lib/root/libminicern.so -O2 -m64 -mmacosx-version-min=10.6 -o lib/libminicern.so misc/minicern/src/cernlib.o -ldl misc/minicern/src/hbook.o misc/minicern/src/kernlib.o misc/minicern/src/zebra.o /bin/sh: gfortran: command not found /bin/sh: gfortran: command not found
:info:destroot i686-apple-darwin10-g++-4.2.1: /bin/sh:: No such file or directory
:info:destroot i686-apple-darwin10-g++-4.2.1: gfortran:: No such file or directory
:info:destroot i686-apple-darwin10-g++-4.2.1: command: No such file or directory
:info:destroot i686-apple-darwin10-g++-4.2.1: not: No such file or directory
:info:destroot i686-apple-darwin10-g++-4.2.1: found: No such file or directory
:info:destroot i686-apple-darwin10-g++-4.2.1: /bin/sh:: No such file or directory
:info:destroot i686-apple-darwin10-g++-4.2.1: gfortran:: No such file or directory
:info:destroot i686-apple-darwin10-g++-4.2.1: command: No such file or directory
:info:destroot i686-apple-darwin10-g++-4.2.1: not: No such file or directory
:info:destroot i686-apple-darwin10-g++-4.2.1: found: No such file or directory
:info:destroot make: *** [lib/libminicern.so] Error 1
:info:destroot shell command " cd "/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_portfiles_science_root/work/root" && /usr/bin/make install DESTDIR=/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_portfiles_science_root/work/destroot " returned error 2
:error:destroot Target org.macports.destroot returned: shell command failed (see log for details)
:debug:destroot Backtrace: shell command failed (see log for details)
    while executing
"command_exec destroot"
    (procedure "portdestroot::destroot_main" line 2)
    invoked from within
"$procedure $targetname"
:info:destroot Warning: the following items did not execute (for root): org.macports.destroot
:notice:destroot Log for root is at: /opt/local/var/macports/logs/_Users_chris_Projects_MacPorts_portfiles_science_root/main.log

It looks like the problem is gfortran from gcc4.4 is used to build some *.f files, but then gcc 4.2 is used to link them. Not sure how to fix this ?

Just wondering, but would it make sense to move to using gcc44 by default to build this port ?

Chris

Attachments (2)

root-v5.30.00.diff (867 bytes) - added by cjones051073 (Chris Jones) 13 years ago.
root-v5.30.00-V2.diff (2.3 KB) - added by cjones051073 (Chris Jones) 13 years ago.

Download all attachments as: .zip

Change History (12)

Changed 13 years ago by cjones051073 (Chris Jones)

Attachment: root-v5.30.00.diff added

comment:1 Changed 13 years ago by jmroot (Joshua Root)

Cc: mattiafrancescomoro@… added
Keywords: haspatch maintainer added
Version: 1.9.2

comment:2 Changed 13 years ago by mf2k (Frank Schima)

Cc: macsforever2000@… added

Cc Me!

comment:3 Changed 13 years ago by mf2k (Frank Schima)

I think it makes sense to make gcc 4.4 the compiler only when selecting the gfortran variant. I'm working on a fix. But it occurs to me, perhaps the gfortran variant should be named gcc44 and then we can add gcc45 and maybe gcc46 variants too.

comment:4 Changed 13 years ago by mf2k (Frank Schima)

Well my attempt to fix the gfortran problem by using gcc 4.4 failed. Here's the error:

cp -f /opt/local/var/macports/build/_opt_mports_trunk_dports_science_root/root/work/root/cint/cint/src/loadfile.cxx cint/cint/src/loadfile_tmp.cxx
bin/rmkdepend -R -fcint/cint/src/loadfile_tmp.d -Y -w 1000 -- -m64 -pipe -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Iinclude -DR__HAVE_CONFIG  -DG__REGEXP -DG__UNIX -DG__SHAREDLIB -DG__ROOT -DG__REDIRECTIO -DG__OSFDLL -DG__STD_EXCEPTION  -DG__HAVE_CONFIG -DG__NOMAKEINFO -DG__CINTBODY -I/opt/local/var/macports/build/_opt_mports_trunk_dports_science_root/root/work/root/cint/cint/inc -I/opt/local/var/macports/build/_opt_mports_trunk_dports_science_root/root/work/root/cint/cint/src -I/opt/local/var/macports/build/_opt_mports_trunk_dports_science_root/root/work/root/cint/cint/src/dict -pthread -UR__HAVE_CONFIG -DROOTBUILD -I. -D__cplusplus -- cint/cint/src/loadfile_tmp.cxx
/opt/local/bin/g++-mp-4.4 -O2 -m64 -pipe -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Iinclude -DR__HAVE_CONFIG  -DG__REGEXP -DG__UNIX -DG__SHAREDLIB -DG__ROOT -DG__REDIRECTIO -DG__OSFDLL -DG__STD_EXCEPTION  -DG__HAVE_CONFIG -DG__NOMAKEINFO -DG__CINTBODY -I/opt/local/var/macports/build/_opt_mports_trunk_dports_science_root/root/work/root/cint/cint/inc -I/opt/local/var/macports/build/_opt_mports_trunk_dports_science_root/root/work/root/cint/cint/src -I/opt/local/var/macports/build/_opt_mports_trunk_dports_science_root/root/work/root/cint/cint/src/dict -pthread -UR__HAVE_CONFIG -DROOTBUILD -I. -o cint/cint/src/loadfile_tmp.o -c cint/cint/src/loadfile_tmp.cxx
g++ -O2 -m64 -mmacosx-version-min=10.6 -o cint/cint/main/cint_tmp cint/cint/main/cppmain.o \
		   cint/cint/src/g__cfunc.o cint/cint/src/config/strlcpy.o cint/cint/src/config/strlcat.o cint/cint/src/config/snprintf.o cint/cint/main/G__setup.o cint/cint/src/Api.o cint/cint/src/BaseCls.o cint/cint/src/CallFunc.o cint/cint/src/Class.o cint/cint/src/DataMbr.o cint/cint/src/FastAllocString.o cint/cint/src/Method.o cint/cint/src/MethodAr.o cint/cint/src/Shadow.o cint/cint/src/Token.o cint/cint/src/Type.o cint/cint/src/Typedf.o cint/cint/src/auxu.o cint/cint/src/bc_assign.o cint/cint/src/bc_autoobj.o cint/cint/src/bc_cfunc.o cint/cint/src/bc_debug.o cint/cint/src/bc_eh.o cint/cint/src/bc_exec.o cint/cint/src/bc_inst.o cint/cint/src/bc_item.o cint/cint/src/bc_parse.o cint/cint/src/bc_reader.o cint/cint/src/bc_type.o cint/cint/src/bc_vtbl.o cint/cint/src/cast.o cint/cint/src/debug.o cint/cint/src/decl.o cint/cint/src/disp.o cint/cint/src/dump.o cint/cint/src/end.o cint/cint/src/error.o cint/cint/src/expr.o cint/cint/src/fread.o cint/cint/src/func.o cint/cint/src/gcoll.o cint/cint/src/global1.o cint/cint/src/global2.o cint/cint/src/ifunc.o cint/cint/src/inherit.o cint/cint/src/init.o cint/cint/src/input.o cint/cint/src/intrpt.o cint/cint/src/loadfile_tmp.o cint/cint/src/macro.o cint/cint/src/malloc.o cint/cint/src/memtest.o cint/cint/src/new.o cint/cint/src/newlink.o cint/cint/src/opr.o cint/cint/src/parse.o cint/cint/src/pause.o cint/cint/src/pcode.o cint/cint/src/pragma.o cint/cint/src/quote.o cint/cint/src/random.o cint/cint/src/rflx_gendict.o cint/cint/src/rflx_gensrc.o cint/cint/src/rflx_tools.o cint/cint/src/scrupto.o cint/cint/src/shl.o cint/cint/src/sizeof.o cint/cint/src/struct.o cint/cint/src/stub.o cint/cint/src/tmplt.o cint/cint/src/typedef.o cint/cint/src/val2a.o cint/cint/src/value.o cint/cint/src/var.o cint/cint/src/dict/Apiif.o cint/cint/src/dict/stdstrct.o cint/cint/src/dict/gcc4strm.o -lm   -ldl
Undefined symbols:
  "std::ctype<char>::_M_widen_init() const", referenced from:
      Cint::G__ShadowMaker::WriteNamespaceHeader(Cint::G__ClassInfo&)     in Shadow.o
      Cint::G__ShadowMaker::WriteShadowClass(Cint::G__ClassInfo&, int) in Shadow.o
      Cint::G__ShadowMaker::WriteShadowClass(Cint::G__ClassInfo&, int) in Shadow.o
      Cint::G__ShadowMaker::WriteShadowClass(Cint::G__ClassInfo&, int) in Shadow.o
      Cint::G__ShadowMaker::WriteShadowClass(Cint::G__ClassInfo&, int) in Shadow.o
      Cint::G__ShadowMaker::WriteShadowClass(Cint::G__ClassInfo&, int) in Shadow.o
      Cint::G__ShadowMaker::WriteShadowClass(Cint::G__ClassInfo&, int) in Shadow.o
      Cint::G__ShadowMaker::WriteShadowClass(Cint::G__ClassInfo&, int) in Shadow.o
      Cint::G__ShadowMaker::WriteShadowClass(Cint::G__ClassInfo&, int) in Shadow.o
      Cint::G__ShadowMaker::WriteShadowClass(Cint::G__ClassInfo&, int) in Shadow.o
      Cint::G__ShadowMaker::WriteShadowClass(Cint::G__ClassInfo&, int) in Shadow.o
      Cint::G__ShadowMaker::WriteShadowClass(Cint::G__ClassInfo&, int) in Shadow.o
      Cint::G__ShadowMaker::WriteShadowClass(Cint::G__ClassInfo&, int) in Shadow.o
      Cint::G__ShadowMaker::WriteShadowClass(Cint::G__ClassInfo&, int) in Shadow.o
      Cint::G__ShadowMaker::WriteShadowClass(Cint::G__ClassInfo&, int) in Shadow.o
      Cint::G__ShadowMaker::WriteShadowClass(Cint::G__ClassInfo&, int) in Shadow.o
      Cint::G__ShadowMaker::WriteAllShadowClasses()      in Shadow.o
      Cint::G__ShadowMaker::WriteAllShadowClasses()      in Shadow.o
      Cint::G__ShadowMaker::WriteAllShadowClasses()      in Shadow.o
      Cint::G__ShadowMaker::WriteAllShadowClasses()      in Shadow.o
      Cint::G__ShadowMaker::WriteAllShadowClasses()      in Shadow.o
      Cint::G__ShadowMaker::WriteAllShadowClasses()      in Shadow.o
      Cint::G__ShadowMaker::WriteAllShadowClasses()      in Shadow.o
      Cint::G__ShadowMaker::WriteAllShadowClasses()      in Shadow.o
      G__G__stream_13_0_3(G__value*, char const*, G__param*, int)in gcc4strm.o
      G__G__stream_13_0_21(G__value*, char const*, G__param*, int)in gcc4strm.o
      G__G__stream_12_0_9(G__value*, char const*, G__param*, int)in gcc4strm.o
      G__G__stream_12_0_7(G__value*, char const*, G__param*, int)in gcc4strm.o
      G__G__stream_12_0_4(G__value*, char const*, G__param*, int)in gcc4strm.o
      G__G__stream__0_21(G__value*, char const*, G__param*, int)in gcc4strm.o
      G__G__stream_13_0_2(G__value*, char const*, G__param*, int)in gcc4strm.o
ld: symbol(s) not found

My change was the following:

variant gfortran description {Adds support for fortran compilation} {
    configure.args-append   --with-cc=gcc-mp-4.4
    configure.args-append   --with-cxx=cpp-mp-4.4
    configure.args-append   --with-f77=gfortran-mp-4.4
    configure.compiler      macports-gcc-4.4
    depends_lib-append      port:gcc44
}

Any other ideas?

comment:5 Changed 13 years ago by cjones051073 (Chris Jones)

In the error above the first compilation is using /opt/local/bin/g++-mp-4.4, but then the second line after this, that links int/cint/main/cint_tmp is using plain 'g++' ?

I suspect this is the problem, since googling around for the error I found a few reports that all said more or less the same thing, the error comes when you mix and match different compilers. We need to make sure 'everything' uses macports gcc4.4 when enabling this variant.

Chris

comment:6 Changed 13 years ago by cjones051073 (Chris Jones)

I checked with the root 'configure' script, and there is another compiler setting for the linker (--with-ld) which I think we need to set as well to use gcc4.4 as well. I have a test build running with

variant gfortran description {Adds support for fortran compilation} {
    configure.args-append   --with-cc=gcc-mp-4.4
    configure.args-append   --with-cxx=cpp-mp-4.4
    configure.args-append   --with-f77=gfortran-mp-4.4
    configure.args-append   --with-ld=g++-mp-4.4
    configure.compiler      macports-gcc-4.4
    depends_lib-append      port:gcc44
}

and I'll report back how that goes.

I response to your question above, I agree keeping the default port setting to use the system compiler makes sense. I would also support removing the 'gfortran' variant and renaming it gc44, with gc45 ec. variants as well, as this will help testing with new compilers etc.

Chris

comment:7 Changed 13 years ago by cjones051073 (Chris Jones)

OK, the test worked fine for me. I will attach a new unified diff with the --with-ld setting, renaming the gfortran variant gcc44 and adding gcc45 and gcc46 variant.

One thing I don't know how to do, is how to say only one of the gcc variants can be active at any given time. Can this be done ?

Chris

Changed 13 years ago by cjones051073 (Chris Jones)

Attachment: root-v5.30.00-V2.diff added

comment:8 Changed 13 years ago by mf2k (Frank Schima)

Thanks for catching that! Yes, variants can conflict with each other. I'm adding it to my local Portfile and I will commit it after testing.

comment:9 Changed 13 years ago by cjones051073 (Chris Jones)

I tested the gcc45 and gcc46 variants last night. The gcc45 one worked just fine, but the gcc46 one failed to configure since the macports option

configure.compiler macports-gcc-4.6

was not known. Looking through a few other ports it looks like this compiler is a little more experimental than the others, and needs to be treated a little differently at the moment. If you know how to fix it fine, otherwise maybe just remove the gcc46 variant for the moment ?

comment:10 Changed 13 years ago by mf2k (Frank Schima)

Resolution: fixed
Status: newclosed

r80163. I commented out the gcc46 variant for now. Thanks!

Note: See TracTickets for help on using tickets.