Opened 12 years ago

Closed 11 years ago

#38995 closed submission (fixed)

Submission: etsf_io

Reported by: dstrubbe (David Strubbe) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: Cc: cooljeanius (Eric Gallager), ryandesign (Ryan Carsten Schmidt)
Port: etsf_io

Description

Portfile for ETSF_IO, an input/output library for electronic structure codes, intended for the science category.

Attachments (1)

Portfile (2.0 KB) - added by dstrubbe (David Strubbe) 11 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 12 years ago by cooljeanius (Eric Gallager)

I tried building it, and it ran into this error when configuring:

checking for /opt/local/include/netcdf.mod... no
checking for /opt/local/include/NETCDF.mod... no
checking for /opt/local/include/NETCDF.MOD... no
Action: install NetCDF and set its path with --with-netcdf-module-path.
configure: error: "No 'NetCDF' module found."
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_LocalPorts_science_etsf_io/etsf_io/work/etsf_io-1.0.3" && ./configure --prefix=/opt/local --disable-dependency-tracking --with-netcdf-module-path=/opt/local/include --with-netcdf-ldflags=-L/opt/local/lib FCFLAGS=-O3 CFLAGS=-O3 
Exit code: 1

This is where netcdf-fortran puts its mods:

gl00b05046:~ egall$ port contents netcdf-fortran | grep mod
  /opt/local/include/TYPESIZES.mod
  /opt/local/include/mods32/NETCDF.mod
  /opt/local/include/mods64/NETCDF.mod

Not sure how you'd do this when building universal... maybe by using the muniversal portgroup? idk...

Last edited 12 years ago by cooljeanius (Eric Gallager) (previous) (diff)

comment:2 Changed 12 years ago by dstrubbe (David Strubbe)

Hm, thanks for trying it out. Were you building etsf_io, netcd-fortran, or both as universal? netcdf-fortran puts its mods here for me, when building +gcc46 and not universal:

  /opt/local/include/NETCDF.mod
  /opt/local/include/TYPESIZES.mod

Not sure why this would be different. I don't see anything about mods explicitly in the netcdf-fortran Portfile. Also, there are no other ports depending on netcdf-fortran to use as a model, it seems from "port list depends:netcdf-fortran".

comment:3 in reply to:  2 Changed 12 years ago by cooljeanius (Eric Gallager)

Replying to dstrubbe@…:

Hm, thanks for trying it out. Were you building etsf_io, netcd-fortran, or both as universal?

Both. I have +universal in my variants.conf file.

comment:4 Changed 12 years ago by dstrubbe (David Strubbe)

I tried to build netcdf-fortran +universal, but it set off a cascade of rebuilds of dependencies, ending in an error (#39016), so I cannot reproduce.

Maybe something like this is needed?

variant universal {
    configure.args.delete   --with-netcdf-module-path=${prefix}/include
    configure.args.append   --with-netcdf-module-path=${prefix}/mod32/include
}

But, should it use mod32 or mod64?

comment:5 in reply to:  4 Changed 12 years ago by cooljeanius (Eric Gallager)

Replying to dstrubbe@…:

But, should it use mod32 or mod64?

If you use the `muniversal` portgroup, I'm pretty sure you could use both... although I'm not sure how exactly though...

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

comment:6 Changed 12 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:7 Changed 12 years ago by dstrubbe (David Strubbe)

Well, maybe the simplest is just to add "universal_variant no". I am not sure how to use the portgroup.

comment:8 in reply to:  7 Changed 12 years ago by cooljeanius (Eric Gallager)

Replying to dstrubbe@…:

I am not sure how to use the portgroup.

Yeah, it could really use some more usage notes in its comments...

Edit: That's #32428

Last edited 11 years ago by cooljeanius (Eric Gallager) (previous) (diff)

comment:9 Changed 11 years ago by dstrubbe (David Strubbe)

Ok let's just have no universal, pending figuring out how to do that properly. Please review my revised Portfile submission.

Changed 11 years ago by dstrubbe (David Strubbe)

Attachment: Portfile added

comment:10 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added

Fetch fails because the host is offline. I found a copy of the distfile on Launchpad.

Configure fails:

checking for /opt/local/include/netcdf.mod... no
checking for /opt/local/include/NETCDF.mod... no
checking for /opt/local/include/NETCDF.MOD... no
Action: install NetCDF and set its path with --with-netcdf-module-path.
configure: error: "No 'NetCDF' module found."

Note that I do have netcdf-fortran installed with the universal variant. It appears that netcdf-fortran installs NETCDF.mod into a different place depending on whether it is installed with the universal variant or not. That makes it difficult for ports like etsf_io that want to use NETCDF.mod to know where it is. This might be a bug in netcdf-fortran; I've filed #39319 for that.

comment:11 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

Committed the port in r106631 with these changes:

  • added launchpad download location (the main host is back up in the mean time)
  • changed "mod32" and "mod64" to "mods32" and "mods64" in comment about netcdf-fortran universal
  • added "require_active_variants netcdf-fortran {} universal" to ensure netcdf-fortran is not installed universal, until we figure out what to do about that
  • instead of setting "FCFLAGS=-O3 CFLAGS=-O3" in configure.args, I set configure.optflags to "-O3"
Note: See TracTickets for help on using tickets.