Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#64178 closed defect (fixed)

python310 @3.10.0_3: cannot build on MacOS 10.5 Leopard

Reported by: khepler Owned by: jmroot (Joshua Root)
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: leopard haspatch Cc: jmroot (Joshua Root), kencu (Ken), dgelessus (dgelessus), evanmiller (Evan Miller), ballapete (Peter "Pete" Dyballa)
Port: python310

Description

The Portfile erroneously applies patch-no-copyfile-on-Tiger.diff on 10.5. Copyfile was introduced in 10.5. With the patch, the build fails because it removes the copyfile #include and COPYFILE_DATA is then undefined.

Attachments (1)

python310-portfile.diff (686 bytes) - added by khepler 3 years ago.

Download all attachments as: .zip

Change History (17)

Changed 3 years ago by khepler

Attachment: python310-portfile.diff added

comment:1 Changed 3 years ago by jmroot (Joshua Root)

Cc: kencu dgelessus added

Those patches are due to dgelessus and kencu, and I have no way to test them. But I think that given how the copyfile patch is written, this indicates that it needs to be updated. If it doesn't work it's probably not working on Tiger either, and if it worked it should work on Leopard too.

comment:2 Changed 3 years ago by evanmiller (Evan Miller)

Copyfile support has been added to legacysupport. So in place of the patch something like

PortGroup legacysupport 1.1
# copyfile
legacysupport.newest_darwin_requires_legacy 8

should suffice.

comment:3 Changed 3 years ago by kencu (Ken)

I was thinking the copyfile-related patches here and there in MacPorts might disappear now too.

Evan, over to you?

comment:4 Changed 3 years ago by evanmiller (Evan Miller)

Sure, will mess around with it once some local GCC builds finish. (Currently trying to work around some hanging C++ exceptions here on PPC...)

comment:5 Changed 3 years ago by evanmiller (Evan Miller)

Cc: evanmiller added

comment:6 Changed 3 years ago by kencu (Ken)

FYI Iain told me he could not get the exceptions to work properly with the old system libgcc_s_1.dylib and had to replace the system version with the newer version from the gcc7+ build to get it working right.

For a while we discussed an installer that might replace the older libgcc parts on PPC Darwin with newer libgcc parts, but in the end we knew that would likely never fly so abandoned the idea.

comment:7 Changed 3 years ago by evanmiller (Evan Miller)

@kencu I'm experimenting with --enable-sjlj-exceptions to see if setjmp/longjmp works any better than Dwarf2 exceptions. The run-times aren't compatible, but I'm hoping it might be a viable fallback option.

comment:8 Changed 3 years ago by jmroot (Joshua Root)

Owner: set to jmroot
Resolution: fixed
Status: newclosed

In 6740572f80f2f3321dc7ccc5b4070f6bc469f898/macports-ports (master):

python310: fix build on 10.5 and probably 10.4

Closes: #64178
Closes: https://github.com/macports/macports-ports/pull/13304

comment:9 in reply to:  2 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)

Replying to evanmiller:

Copyfile support has been added to legacysupport. So in place of the patch something like

PortGroup legacysupport 1.1
# copyfile
legacysupport.newest_darwin_requires_legacy 8

should suffice.

Using the patch

@@ -2,6 +2,9 @@
 
 PortSystem          1.0
 PortGroup           select 1.0
+PortGroup           legacysupport 1.1
+# copyfile
+legacysupport.newest_darwin_requires_legacy 8
 
 name                python38

for Portfile leads to an error I reported in #65019.

comment:10 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)

I found the real bug: I changed the file names on lines

     45     patchfiles-append  patch-no-copyfile-on-Tiger.diff \
     46                        patch-threadid-older-systems.diff

and commented line #46, but left the BACKSLASH on line #45 intact. Python has started to build…

comment:11 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)

The build still fails, with the same report. The cause is a sym-link:

lrwxr-xr-x 1 root admin 112 10. Nov 2018  /opt/local/include/copyfile.h -> /opt/local/var/macports/sources/lil.fr.rsync.macports.org/release/tarballs/ports/net/rsync-lart/files/copyfile.h

The target does not exist. Actually since some time I am rsynching from rsync.macports.org and so I deleted some old stuff.

comment:12 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)

Leopard has

-rw-r--r-- 1 root wheel 3523 19. Feb 2008  /Developer/SDKs/MacOSX10.5.sdk/usr/include/copyfile.h
-rw-r--r-- 1 root admin 3150 26. Feb 2015  /opt/mports/trunk/dports/net/rsync-lart/files/copyfile.h
-r--r--r-- 1 root wheel 3523 19. Feb 2008  /usr/include/copyfile.h

comment:13 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)

Cc: ballapete added

comment:14 in reply to:  11 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)

It's actually the source that is deleted. The target, /opt/local/include/copyfile.h, continued to exist.

comment:15 Changed 3 years ago by kencu (Ken)

you’re needing the new release of legacysupport

https://github.com/macports/macports-ports/pull/14587

which adds copyfile.h for Tiger, or you can use legacysupport-devel which has had it for six nonths now.

comment:16 Changed 3 years ago by kencu (Ken)

strange you had some random copyfile.h symlink there. weird stuff grows in ancient trees:)

Note: See TracTickets for help on using tickets.