New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #35245 (new enhancement)

Opened 10 months ago

Last modified 10 months ago

petsc: Build shared libraries

Reported by: jolivetinsar@… Owned by: mmoll@…
Priority: Normal Milestone:
Component: ports Version: 2.1.1
Keywords: Cc:
Port: petsc

Description (last modified by ryandesign@…) (diff)

Hello,

I need to compile petsc with the option --with-shared-libraries=1. I modified the port on my machine, creating a new variant:

variant shared description {build with shared libraries} {
    configure.args-delete   --with-shared-libraries=0
    configure.args-delete   --with-pic=fPIC
    configure.args-append   --with-shared-libraries=1
}

I have to delete --with-pic=fPIC, otherwise it does not run. Then, it configures and builds fine, but when macports checks on the created files, it complains, and restarts the whole process (and does it over and over again):

It says:

--->  Updating database of binaries: 100.0%
--->  Scanning binaries for linking errors: 100.0%
--->  Found 3 broken file(s), matching files to ports
--->  Found 1 broken port(s), determining rebuild order

I did run

port install --no-rev-upgrade petsc +variant

so that it installs it and stops without checking what's wrong. Compiling goes fine.

I then did run

port -d -y rev-upgrade 

to see the problem, and I have this:

DEBUG: Marking /opt/local/lib/petsc/lib/libparmetis.dylib as broken
Could not open /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_petsc/petsc/work/petsc-3.3-p0/darwin/lib/libmetis.dylib: Error opening or reading file (referenced from /opt/local/lib/petsc/lib/libparmetis.dylib)
DEBUG: Marking /opt/local/lib/petsc/lib/libpetsc.dylib as broken
Could not open /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_petsc/petsc/work/petsc-3.3-p0/darwin/lib/libparmetis.dylib: Error opening or reading file (referenced from /opt/local/lib/petsc/lib/libpetsc.dylib)
DEBUG: Marking /opt/local/lib/petsc/lib/libpetsc.dylib as broken

To further investigate the problem, I tried:

otools -L /opt/local/lib/petsc/libpetsc.dylib

that says this file does not exists:

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_petsc/petsc/work/destroot/opt/local/lib/petsc/lib/libpetsc.dylib

There is no /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_petsc/ directory, indeed.

I am kind of stuck there. I am probably doing things wrong, but I guess also there is a linking problem somewhere.

Thank you for the help
Romain

Change History

comment:1 Changed 10 months ago by ryandesign@…

  • Port set to petsc
  • Owner changed from macports-tickets@… to mmoll@…
  • Type changed from defect to enhancement
  • Description modified (diff)
  • Summary changed from Building shared libraries of petsc to petsc: Build shared libraries

Please remember to use WikiFormatting, to fill in the Port field, and to Cc the maintainer of that port.

The issue tracker is not for support questions. You already asked for support for this on the mailing list, so that's fine; that's the better place for that. The issue tracker is for bug reports and enhancement requests, so we can consider this the enhancement request to add shared libraries to the petsc port. That's reasonable; we do want ports to install both shared libraries and static libraries, if possible.

Sean Farley provided a link to an updated petsc portfile that we could consider using.

Note: See TracTickets for help on using tickets.