Project

General

Profile

Actions

Bug #2773

closed

Mac OS X build issue Undefined symbols

Added by ryandesign over 7 years ago. Updated over 7 years ago.

Status:
Fixed
Priority:
Low
Category:
build_autotools
Target version:
ASK QUESTIONS IN Forums:

Description

With the patches from #2765 and #2772, lighttpd 1.4.43 fails to build on Mac OS X 10.6 Snow Leopard with:

rand.c: In function ‘li_rand_reseed’:
rand.c:130: warning: implicit declaration of function ‘arc4random_buf’
Undefined symbols:
  "_arc4random_buf", referenced from:
      _li_rand_reseed in liblightcomp_la-rand.o
ld: symbol(s) not found

Here is a build log: https://build.macports.org/builders/ports-10.6_x86_64_legacy-builder/builds/11665/steps/install-port/logs/stdio

Your configure script checks for and confirms the availability of arc4random (which has been available since Mac OS X 10.4 Tiger) but then your code uses arc4random_buf (which was not added until OS X 10.7 Lion).

Actions #1

Updated by gstrauss over 7 years ago

  • Status changed from New to Need Feedback

@ryandesign, I hardly think that each undefined symbol is worthy of a new ticket. Please reopen an existing (recent) bug report, or post to that (recent) bug report, instead of filing a new ticket.

I compiled lighttpd on Mac OS X 10.11.6 and both arc4random and arc4random_buf are defined. autotools detect and define HAVE_ARC4RANDOM in config.h, and 'man arc4random' documents arc4random() and arc4random_buf().

What version of Mac OS X are you running, and why are you unable to perform the (free) upgrade? With Mac OS X Sierra (10.12.1), some devices -- including the 2007 iMac that I occassionally pull out to test with -- won't be able to upgrade to 10.12.1, but the machine was still able to upgrade to 10.11.6.

Actions #2

Updated by ryandesign over 7 years ago

I open a new ticket for each new issue. If there is a previous ticket that covers this issue, I would be happy to continue the conversation in that issue, but I did not find such an issue.

This issue occurs on Mac OS X 10.6 Snow Leopard. It does not occur on OS X 10.7 Lion or later.

I am a manager of the MacPorts project and the maintainer of the lighttpd port there. We have an automated build system that attempts to build each port on each version of macOS. That's where I discovered that it does not build on 10.6 and why I am reporting it to you. This is a regression from 1.4.41 which did build on 10.6, so I would think you would be interested in regressions as well. There are some Macs that cannot be upgraded past 10.6 so we try to provide best-effort support for older systems.

Actions #3

Updated by gstrauss over 7 years ago

  • Subject changed from Undefined symbols: _arc4random_buf to Mac OS X build issue Undefined symbols
  • Priority changed from Normal to Low

I open a new ticket for each new issue. If there is a previous ticket that covers this issue, I would be happy to continue the conversation in that issue, but I did not find such an issue.

"Build issue on Mac OS X for current lighttpd release" are all related. If you did not find such a ticket, then that is because you filed a ticket for each symbol, which is what I am asking you not to do.

There are some Macs that cannot be upgraded past 10.6 so we try to provide best-effort support for older systems.

Fewer than 5 minutes on a search engine suggests otherwise:

http://www.zdnet.com/article/upgrading-os-x-on-older-macs/
http://tidbits.com/article/13498

This is a regression from 1.4.41 which did build on 10.6, so I would think you would be interested in regressions as well.

Within reason, yes, I am interested. However, for machines > 10 years old and for which an upgrade path exists, I have a greater concern with the operating system bugs and security issues running an end-of-lifed operating system (no longer receiving security updates), which, in particular, includes aging SSL software. Unmaintained operating systems connected to the internet are an increasing source of problems. You are not doing your users a service by neglecting to push good software maintenance hygiene for the software upon which lighttpd depends, including the operating system. I would suggest that it would be a good idea if MacPorts had an end-of-life policy, too, even if some effort was made to provide fixes for ancient hardware beyond the end-of-life.

Here's a Feb 2014 article about Apple no longer providing security fixes for 10.6, which noted (at the time it was written):

"With Snow Leopard's retirement, 1 in 5 Macs are running an operating system that could be compromised because of unpatched vulnerabilities." 

http://www.computerworld.com/article/2487996/malware-vulnerabilities/apple-retires-snow-leopard-from-support--leaves-1-in-5-macs-vulnerable-to-at.html

Here is some extra info from Apple regarding hardware:
Vintage and obsolete products
https://support.apple.com/en-us/HT201624

Actions #4

Updated by ryandesign over 7 years ago

I don't have anything further to add. I've reported the bug to you; you can decide how you want to address it.

Actions #5

Updated by gstrauss over 7 years ago

Some more security-related links for your Mac OS X users:

Apple security updates
https://support.apple.com/en-us/HT201222

What are Apple's Update and End-Of-Life policies in 2015?
http://apple.stackexchange.com/questions/212064/what-are-apples-update-and-end-of-life-policies-in-2015

(Hidden Backdoor with Root) bug in 10.9 and earlier that is not fixed:
http://apple.stackexchange.com/questions/180396/how-to-mitigate-cve-2015-1130-hidden-backdoor-with-root-due-to-lack-of-apple-s

Where can I find an end of life schedule for Mac OS's?
https://discussions.apple.com/thread/2649128?start=0

.

Here's some more detailed info about upgrading Mac OS X from various versions:

Macs and Software that will run with Snow Leopard (Mac OS X 10.6.x)
https://discussions.apple.com/docs/DOC-2455
Upgrading to 10.7 and above, don't forget Rosetta!
https://discussions.apple.com/docs/DOC-6271

http://www.gottabemobile.com/2016/03/02/os-x-el-capitan-on-older-mac/

.

I don't have anything further to add. I've reported the bug to you; you can decide how you want to address it.

I have addressed this "bug" in my posts above and will leave this ticket open a few more days in case you'd like to add anything.

[edited to add link for "Upgrading to 10.7 and above"]

Actions #6

Updated by ryandesign over 7 years ago

I don't require your links. I'm aware that Snow Leopard is old. There are some old Macs that cannot upgrade past 10.4 or 10.5 (PowerPC Macs) or 10.6 (32-bit Intel Macs). lighttpd used to build on Snow Leopard, and now does not. If you don't wish to correct that problem, that's up to you. I was just extending you a courtesy by reporting that problem to you.

Actions #7

Updated by ryandesign over 7 years ago

You already have an alternate implementation that is used when arc4random is not available. I was able to work around the problem on 10.6 and use that alternate implementation by passing the configure argument ac_cv_func_arc4random=no. The simplest solution might be to change your configure script: test for the existence of arc4random_buf instead of arc4random.

Actions #8

Updated by gstrauss over 7 years ago

  • Status changed from Need Feedback to Patch Pending
  • Target version changed from 1.4.x to 1.4.44
Actions #9

Updated by gstrauss over 7 years ago

  • Status changed from Patch Pending to Fixed
  • % Done changed from 0 to 100
Actions

Also available in: Atom