[MacPorts] #35245: petsc: Build shared libraries (was: Building shared libraries of petsc)

MacPorts noreply at macports.org
Wed Jul 18 17:02:57 PDT 2012


#35245: petsc: Build shared libraries
------------------------------------+---------------------------------------
 Reporter:  jolivetinsar@…          |       Owner:  mmoll@…           
     Type:  enhancement             |      Status:  new               
 Priority:  Normal                  |   Milestone:                    
Component:  ports                   |     Version:  2.1.1             
 Keywords:                          |        Port:  petsc             
------------------------------------+---------------------------------------
Changes (by ryandesign@…):

  * owner:  macports-tickets@… => mmoll@…
  * type:  defect => enhancement
  * port:  => petsc


Old description:

> 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

New description:

 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 [[br]]
 Romain

--

Comment:

 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
 [http://lists.macosforge.org/pipermail/macports-
 users/2012-July/029820.html 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.

 [http://lists.macosforge.org/pipermail/macports-
 users/2012-July/029831.html Sean Farley provided] a link to an updated
 petsc portfile that we could consider using.

-- 
Ticket URL: <https://trac.macports.org/ticket/35245#comment:1>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list