Opened 11 years ago

Closed 11 years ago

#37247 closed defect (fixed)

py27-cairo @1.10.0 Error: reinplace: couldn't read file Makefile.in

Reported by: nonstop.server@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: leopard Cc: seanfarley (Sean Farley)
Port: py27-cairo

Description

Upgrading py27-cairo from version 1.8.10_2 to version 1.10.0 fails with error message:

Error: reinplace: couldn't read file "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-cairo/py27-cairo/work/py2cairo-1.10.0/cairo/Makefile.in": no such file or directory
Error: org.macports.patch for port py27-cairo returned: reinplace sed(1) failed

The following Makefile.in files are available in the build directory:

53012015       32 -rw-r--r--    1 macports admin       14798 May  1  2011 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-cairo/py27-cairo/work/py2cairo-1.10.0/doc/Makefile.in
53012035       24 -rw-r--r--    1 macports admin       11015 May  1  2011 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-cairo/py27-cairo/work/py2cairo-1.10.0/examples/Makefile.in
53012004       56 -rw-r--r--    1 macports admin       27928 May  1  2011 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-cairo/py27-cairo/work/py2cairo-1.10.0/Makefile.in
53012082       56 -rw-r--r--    1 macports admin       28111 May  1  2011 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-cairo/py27-cairo/work/py2cairo-1.10.0/src/Makefile.in
53012099       24 -rw-r--r--    1 macports admin       10083 May  1  2011 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-cairo/py27-cairo/work/py2cairo-1.10.0/test/Makefile.in

Version Information:

Mac OS Version:
ProductName:	Mac OS X
ProductVersion:	10.5.8
BuildVersion:	9L31a
Darwin 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386

Xcode Version:
Xcode 3.1.4
Component versions: DevToolsCore-1204.0; DevToolsSupport-1186.0
BuildVersion: 9M2809

Macports Version:
Version: 2.1.2

Attachments (2)

main.log (7.2 KB) - added by nonstop.server@… 11 years ago.
Portfile-py27-cairo.diff (438 bytes) - added by nonstop.server@… 11 years ago.
proposed patch

Download all attachments as: .zip

Change History (7)

Changed 11 years ago by nonstop.server@…

Attachment: main.log added

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

Keywords: leopard added

That's because the port has this block:

    platform darwin 9 {
        post-patch {
           reinplace "s| -export-symbols-regex.*||g" ${worksrcpath}/cairo/Makefile.in
        }
    }

So those of us not on Leopard would not have seen this issue.

Looking through the source, here are the only places where "-export-symbols-regex" now occurs:

$ grep -r -- -export-symbols-regex work/
work/py2cairo-1.10.0/libtool:  -export-symbols-regex REGEX
work/py2cairo-1.10.0/libtool:      -export-symbols | -export-symbols-regex)
work/py2cairo-1.10.0/ltmain.sh:  -export-symbols-regex REGEX
work/py2cairo-1.10.0/ltmain.sh:      -export-symbols | -export-symbols-regex)
work/py2cairo-1.10.0/src/Makefile.am:_cairo_la_LDFLAGS = -module -avoid-version -export-symbols-regex init_cairo
work/py2cairo-1.10.0/src/Makefile.in:_cairo_la_LDFLAGS = -module -avoid-version -export-symbols-regex init_cairo

So perhaps the reinplace needs to be changed to operate on src/Makefile.in instead (or better yet turned into a patchfile). Or maybe the reinplace is no longer needed at all; it has been there a long time, since r33474, having been copied there from py25-cairo, where it was added in r32471. Someone on Leopard could test without this block...

comment:2 in reply to:  1 Changed 11 years ago by nonstop.server@…

Replying to ryandesign@…:

Following your advice I was able to upgrade to the latest version by removing the reinplace block for platform darwin 9.

% port installed name py27-cairo
The following ports are currently installed:
  py27-cairo @1.8.10_2
  py27-cairo @1.10.0_0+x11 (active)

However I'm not sure how to test (or prove) that the port is working correctly.
A difference report has been attached to the ticket.
Thank you for your advice.

Changed 11 years ago by nonstop.server@…

Attachment: Portfile-py27-cairo.diff added

proposed patch

comment:3 in reply to:  1 Changed 11 years ago by seanfarley (Sean Farley)

Replying to ryandesign@…:

That's because the port has this block:

    platform darwin 9 {
        post-patch {
           reinplace "s| -export-symbols-regex.*||g" ${worksrcpath}/cairo/Makefile.in
        }
    }

So those of us not on Leopard would not have seen this issue.

Looking through the source, here are the only places where "-export-symbols-regex" now occurs:

$ grep -r -- -export-symbols-regex work/
work/py2cairo-1.10.0/libtool:  -export-symbols-regex REGEX
work/py2cairo-1.10.0/libtool:      -export-symbols | -export-symbols-regex)
work/py2cairo-1.10.0/ltmain.sh:  -export-symbols-regex REGEX
work/py2cairo-1.10.0/ltmain.sh:      -export-symbols | -export-symbols-regex)
work/py2cairo-1.10.0/src/Makefile.am:_cairo_la_LDFLAGS = -module -avoid-version -export-symbols-regex init_cairo
work/py2cairo-1.10.0/src/Makefile.in:_cairo_la_LDFLAGS = -module -avoid-version -export-symbols-regex init_cairo

So perhaps the reinplace needs to be changed to operate on src/Makefile.in instead (or better yet turned into a patchfile). Or maybe the reinplace is no longer needed at all; it has been there a long time, since r33474, having been copied there from py25-cairo, where it was added in r32471. Someone on Leopard could test without this block…

Ryan, you are correct. I copied this code block from the previous portfiles but couldn't test it since I didn't have Leopard at the time. So, I thought better safe than sorry to leave it in. If it works without it then by all means commit it. Yay for code removal!

comment:4 in reply to:  1 ; Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to ryandesign@…:

So perhaps the reinplace needs to be changed to operate on src/Makefile.in instead (or better yet turned into a patchfile).

It looks like the pre-unification py27-cairo port was already reinplacing src/Makefile.in ever since its creation in r71669. The py26-cairo port switched to that in r57581.

Or maybe the reinplace is no longer needed at all; it has been there a long time, since r33474, having been copied there from py25-cairo, where it was added in r32471. Someone on Leopard could test without this block...

I reverted the py25-cairo port to revision r32470, before this reinplace was added, and after changing "livecheck.check" to "livecheck.type" it built just fine on Leopard i386. So I don't know. If this was added to fix a build failure, then I guess it is no longer needed. Maybe it was something that's been fixed in a newer version of python itself. To test this idea I reverted the python25 port to the same revision, but after quite a lot of attempts I was unable to build it. Much changed in the python25 port since then to make it compatible with current MacPorts.

On the other hand if it was added to fix a runtime failure, maybe it is still needed. Unfortunately r32471 did not reference a ticket or any other further source of information about the problem it was fixing.

Without further information about what problem was being fixed, the safest thing to do would be to keep the reinplace and just update it for the changed path, as had been done previously for the standalone ports.

comment:5 in reply to:  4 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

Replying to ryandesign@…:

Without further information about what problem was being fixed, the safest thing to do would be to keep the reinplace and just update it for the changed path, as had been done previously for the standalone ports.

Did this for now in r100358. If someone later finds proof that this reinplace is no longer needed it can be removed then.

Note: See TracTickets for help on using tickets.