Opened 12 years ago
Closed 11 years ago
#35245 closed enhancement (fixed)
petsc: Build shared libraries
Reported by: | jolivetr | Owned by: | mamoll (Mark Moll) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.1.1 |
Keywords: | Cc: | ||
Port: | petsc |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
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 (2)
comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|---|
Owner: | changed from macports-tickets@… to mmoll@… |
Port: | petsc added |
Summary: | Building shared libraries of petsc → petsc: Build shared libraries |
Type: | defect → enhancement |
comment:2 Changed 11 years ago by seanfarley (Sean Farley)
Resolution: | → fixed |
---|---|
Status: | new → closed |
My PETSc work has now been integrated by r116395. Closing the ticket now.
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.