Opened 3 years ago

Closed 3 years ago

#64522 closed defect (fixed)

lighttpd @1.4.64_0 fails to build on < 10.12

Reported by: barracuda156 Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: legacy-os Cc:
Port: lighttpd

Description

:info:build mod_webdav.c: In function ‘webdav_copytmp_rename’:
:info:build mod_webdav.c:2597: error: ‘COPYFILE_CLONE_FORCE’ undeclared (first use in this function)
:info:build mod_webdav.c:2597: error: (Each undeclared identifier is reported only once
:info:build mod_webdav.c:2597: error: for each function it appears in.)
:info:build mod_magnet.c: In function ‘magnet_atpanic’:
:info:build mod_magnet.c:1180: warning: no return statement in function returning non-void
:info:build make[3]: *** [mod_webdav_la-mod_webdav.lo] Error 1
:info:build make[3]: *** Waiting for unfinished jobs....
:info:build mv -f .deps/mod_magnet_la-mod_magnet_cache.Tpo .deps/mod_magnet_la-mod_magnet_cache.Plo
:info:build libtool: compile:  /usr/bin/gcc-4.2 -std=gnu99 -DHAVE_CONFIG_H -DHAVE_VERSIONSTAMP_H -DLIBRARY_DIR=\"/opt/local/lib\" -DSBIN_DIR=\"/opt/local/sbin\" -I. -I.. -I/opt/local/include -I/opt/local/include/LegacySupport -isysroot/Developer/SDKs/MacOSX10.5.sdk -D_REENTRANT -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES -pipe -Os -I/opt/local/include/LegacySupport -isysroot/Developer/SDKs/MacOSX10.5.sdk -arch ppc -pipe -Wall -W -Wshadow -pedantic -MT mod_magnet_la-algo_hmac.lo -MD -MP -MF .deps/mod_magnet_la-algo_hmac.Tpo -c algo_hmac.c  -fno-common -DPIC -o .libs/mod_magnet_la-algo_hmac.o
:info:build mv -f .deps/mod_magnet_la-algo_hmac.Tpo .deps/mod_magnet_la-algo_hmac.Plo
:info:build mv -f .deps/mod_magnet_la-mod_magnet.Tpo .deps/mod_magnet_la-mod_magnet.Plo
:info:build make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_lighttpd/lighttpd/work/lighttpd-1.4.64/src'
:info:build make[2]: *** [all] Error 2
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_lighttpd/lighttpd/work/lighttpd-1.4.64/src'
:info:build make[1]: *** [all-recursive] Error 1
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_lighttpd/lighttpd/work/lighttpd-1.4.64'
:info:build make: *** [all] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_lighttpd/lighttpd/work/lighttpd-1.4.64'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_lighttpd/lighttpd/work/lighttpd-1.4.64" && /usr/bin/make -j4 -w all 
:info:build Exit code: 2
:error:build Failed to build lighttpd: command execution failed
:debug:build Error code: CHILDSTATUS 27917 2
:debug:build Backtrace: command execution failed
:debug:build     while executing
:debug:build "system {*}$notty {*}$callback {*}$nice $fullcmdstring"
:debug:build     invoked from within
:debug:build "command_exec -callback portprogress::target_progress_callback build"
:debug:build     (procedure "portbuild::build_main" line 8)
:debug:build     invoked from within
:debug:build "$procedure $targetname"
:error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_lighttpd/lighttpd/main.log for details.

  1. S. The problem is not solved by changing SDK and target to 10.5.

Attachments (2)

config.log (206.1 KB) - added by barracuda156 3 years ago.
main.log (171.2 KB) - added by barracuda156 3 years ago.

Download all attachments as: .zip

Change History (10)

Changed 3 years ago by barracuda156

Attachment: config.log added

Changed 3 years ago by barracuda156

Attachment: main.log added

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

Keywords: snowleopard rosetta added

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

Keywords: legacy-os added; powerpc snowleopard rosetta removed
Owner: set to ryandesign
Status: newassigned
Summary: lighttpd @1.4.64_0+ssl fails to build for ppc on 10.6.8 (Rosetta)lighttpd @1.4.64_0 fails to build on < 10.12

It fails to build on everything older than Sierra because that's when COPYFILE_CLONE was introduced.

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

Status: assignedaccepted

comment:4 in reply to:  2 Changed 3 years ago by barracuda156

Replying to jmroot:

It fails to build on everything older than Sierra because that's when COPYFILE_CLONE was introduced.

I have it built on 10.6 PPC though.

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

I don't really want to create a redmine account just for this, so I'll say this here:

I don't think the man page can possibly be correct about COPYFILE_EXCL | COPYFILE_ACL | COPYFILE_STAT | COPYFILE_XATTR | COPYFILE_DATA | COPYFILE_NOFOLLOW_SRC being equivalent to COPYFILE_CLONE_FORCE, because it says that for both COPYFILE_CLONE_FORCE and COPYFILE_CLONE, and because they're not actually defined that way in the header, they each set a distinct bit:

#define COPYFILE_CLONE		(1<<24)
#define COPYFILE_CLONE_FORCE	(1<<25)

So I think if the intent is to clone the file and fail if that's not possible, that simply can't be done on older than 10.12, and the check to detect that would be simply #ifdef COPYFILE_CLONE_FORCE.

comment:6 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Thanks, I've passed that along. The fix he committed didn't end up using COPYFILE_EXCL | COPYFILE_ACL | COPYFILE_STAT | COPYFILE_XATTR | COPYFILE_DATA | COPYFILE_NOFOLLOW_SRC.

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

Indeed, looking at the source:

https://github.com/apple-oss-distributions/copyfile/blob/b97b6d9be21ee9396151ae957244d45b849e9ee5/copyfile.c
vs https://github.com/apple-oss-distributions/copyfile/blob/a931609d532553fb9817b9ab5899c58348d6e720/copyfile.c

the older one simply lacks any call to clonefileat (not surprising since that was also introduced in 10.12).

Also, what the man page should say is that if actually cloning the file fails, the fallback behaviour for COPYFILE_CLONE is equivalent to the union of those other flags. There's no fallback to copying for COPYFILE_CLONE_FORCE, so mentioning the other flags in relation to it is just wrong.

comment:8 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: acceptedclosed

In 54d00ca28ead14d2750290c62e50f146c38cd8d0/macports-ports (master):

lighttpd: Fix build on 10.5-10.11

Closes: #64522

Note: See TracTickets for help on using tickets.