#49079 closed defect (worksforme)
NTP fails to compile on El Capitan
Reported by: | jos@… | Owned by: | danielluke (Daniel J. Luke) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.3.4 |
Keywords: | Cc: | danielluke (Daniel J. Luke) | |
Port: | ntp |
Description
Also a nice opportunity to go to version 4.2.8p3
:info:build ../config.status --file=ntpsnmpd.8+:./ntpsnmpd.mdoc.in :info:build CCLD ntpsnmpd :info:build ld: warning: directory not found for option '-F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.Internal.sdk/System/Library/PrivateFrameworks/' :info:build ld: warning: directory not found for option '-F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.Internal.sdk/System/Library/Frameworks/' :info:build Undefined symbols for architecture x86_64: :info:build "_debug", referenced from: :info:build _setdebug in libntpq.a(libntpq_a-libntpq.o) :info:build _doqueryex in libntpq.a(libntpq_a-libntpq.o) :info:build _openhost in libntpq.a(libntpq_a-libntpq.o) :info:build _sendpkt in libntpq.a(libntpq_a-libntpq.o) :info:build _MD5auth_setkey in libntp.a(authkeys.o) :info:build _auth_agekeys in libntp.a(authkeys.o) :info:build _addto_syslog in libntp.a(msyslog.o) :info:build ... :info:build "_lib_nextbuf", referenced from: :info:build _trunc_left in libntpq.a(libntpq_a-libntpq.o) :info:build _trunc_right in libntpq.a(libntpq_a-libntpq.o) :info:build _nntohostp in libntpq.a(libntpq_a-libntpq.o) :info:build _dolfptoa in libntp.a(dolfptoa.o) :info:build _common_prettydate in libntp.a(prettydate.o) :info:build _refnumtoa in libntp.a(refnumtoa.o) :info:build _socktoa in libntp.a(socktoa.o) :info:build ... :info:build "_lib_stringbuf", referenced from: :info:build _trunc_left in libntpq.a(libntpq_a-libntpq.o) :info:build _trunc_right in libntpq.a(libntpq_a-libntpq.o) :info:build _nntohostp in libntpq.a(libntpq_a-libntpq.o) :info:build _dolfptoa in libntp.a(dolfptoa.o) :info:build _common_prettydate in libntp.a(prettydate.o) :info:build _refnumtoa in libntp.a(refnumtoa.o) :info:build _socktoa in libntp.a(socktoa.o) :info:build ... :info:build ld: symbol(s) not found for architecture x86_64 :info:build clang: error: linker command failed with exit code 1 (use -v to see invocation) :info:build make[3]: *** [ntpsnmpd] Error 1 :info:build make[3]: *** Waiting for unfinished jobs.... :info:build config.status: creating ntpsnmpd.8+ :info:build mv ntpsnmpd.8+ ntpsnmpd.8 :info:build make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_sysutils_ntp/ntp/work/ntp-4.2.8p2/ntpsnmpd' :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_release_tarballs_ports_sysutils_ntp/ntp/work/ntp-4.2.8p2/ntpsnmpd' :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_release_tarballs_ports_sysutils_ntp/ntp/work/ntp-4.2.8p2' :info:build make: *** [all] Error 2 :info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_sysutils_ntp/ntp/work/ntp-4.2.8p2' :info:build Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_sysutils_ntp/ntp/work/ntp-4.2.8p2" && /usr/bin/make -j4 -w all :info:build Exit code: 2 :error:build org.macports.build for port ntp returned: command execution failed :debug:build Error code: CHILDSTATUS 69855 2 :debug:build Backtrace: command execution failed while executing "system -nice 0 $fullcmdstring" ("eval" body line 1) invoked from within "eval system $notty $nice \$fullcmdstring" invoked from within "command_exec build" (procedure "portbuild::build_main" line 8) invoked from within "portbuild::build_main org.macports.build" ("eval" body line 1) invoked from within "eval $procedure $targetname" :info:build Warning: targets not executed for ntp: org.macports.activate org.macports.build org.macports.destroot org.macports.install :notice:build Please see the log file for port ntp for details: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_sysutils_ntp/ntp/main.log
Attachments (2)
Change History (18)
Changed 9 years ago by jos@…
comment:1 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to jos@…:
:info:build ld: warning: directory not found for option '-F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.Internal.sdk/System/Library/PrivateFrameworks/' :info:build ld: warning: directory not found for option '-F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.Internal.sdk/System/Library/Frameworks/'
What's up with "MacOSX10.11.Internal.sdk"? Why "Internal"?
comment:2 Changed 9 years ago by jos@…
I have removed "Internal" in the makefile, that error goes away, but then I still get "ld: symbol(s) not found for architecture x86_64" I don't know where "Internal" came from.
comment:3 Changed 9 years ago by mdeaudelin (Mathieu Deaudelin-Lemay)
The warning message about "MacOSX10.11.Internal.sdk" sounds like it is caused by a hardcoded value, but has no side-effect. I can build ntp successfully on OS X 10.11 even with this warning message.
However, if I disable all my installed ports, I can reproduce the linker error reported here. To me, this sounds like ntp has a missing dependency on something else.
comment:4 Changed 9 years ago by danielluke (Daniel J. Luke)
I just installed El Capitan today, so I'll be taking a look at this shortly.
comment:5 Changed 9 years ago by danielluke (Daniel J. Luke)
Owner: | changed from macports-tickets@… to dluke@… |
---|---|
Status: | new → assigned |
comment:6 Changed 9 years ago by danielluke (Daniel J. Luke)
According to the -dev mailing list, trace mode is currently broken on El Capitan. Are you only experiencing build failure(s) when running with trace mode?
comment:7 follow-up: 8 Changed 9 years ago by danielluke (Daniel J. Luke)
Resolution: | → worksforme |
---|---|
Status: | assigned → closed |
port updated to 4.2.8p3 in r140933. I'm going to mark this closed for now, please re-open if you can reproduce the problems without trace mode (or after trace mode is working on El Capitan).
comment:8 follow-up: 9 Changed 9 years ago by jos@…
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
I have reinstalled Xcode, reinstalled Macports and I still can reproduce this error. Only "Internal" has gone.
Reported same error to the Pool NTP list in December 2014: http://lists.ntp.org/pipermail/pool/2014-December/007292.html and got some answers in March 2015: http://lists.ntp.org/pipermail/pool/2015-March/007322.html. This was Yosemite. At that time (December 2014) I installed Macports and could build NTP 4.2.8p0, 4.2.8p1 and 4.2.8p2 untill I upgraded to El Capitan. Then I reported here. That is my story! :(
macports@… reported the same error with disabled installed ports. Did you try that?
comment:9 follow-up: 10 Changed 9 years ago by danielluke (Daniel J. Luke)
Resolution: | → worksforme |
---|---|
Status: | reopened → closed |
Replying to jos@…:
Reported same error to the Pool NTP list in December 2014: http://lists.ntp.org/pipermail/pool/2014-December/007292.html and got some answers in March 2015: http://lists.ntp.org/pipermail/pool/2015-March/007322.html. This was Yosemite. At that time (December 2014) I installed Macports and could build NTP 4.2.8p0, 4.2.8p1 and 4.2.8p2 untill I upgraded to El Capitan. Then I reported here. That is my story! :(
... so it's not a problem specific to El Capitan for you? That points to something unusual in your setup.
macports@… reported the same error with disabled installed ports. Did you try that?
Please upload a failing build log without trace mode if you can reproduce the issue.
comment:10 follow-up: 12 Changed 9 years ago by jos@…
Replying to dluke@…:
... so it's not a problem specific to El Capitan for you? That points to something unusual in your setup.
That is possible, but once again:
- Reproducible by others
- Why not possible to build under Yosemite, but did with Macports installed under Yosemite
- Did you try with other ports disabled?
- I already attached a main.log and that gives the same error, but I will attach again
comment:11 Changed 9 years ago by jos@…
I did a fresh install of Xcode/Macports on another (El Capitan) computer and I get the same error. I don't think it is something specific to my systems.
comment:12 follow-up: 13 Changed 9 years ago by danielluke (Daniel J. Luke)
Replying to jos@…:
That is possible, but once again:
Since you're asking for free help from a volunteer, I suggest you adopt a more cooperative tone (if I could reproduce the issue, I would work to fix it, if you can reproduce the issue and you can generate a patch, I will apply it).
- Reproducible by others
only one other report, no build logs.
buildbots built it fine (unfortunately there's no El Capitan build bot working yet).
- Why not possible to build under Yosemite, but did with Macports installed under Yosemite
I don't have any way of knowing why your system worked that way.
- Did you try with other ports disabled?
the buildbots did
- I already attached a main.log and that gives the same error, but I will attach again
The main.log you originally attached was the result from building while using trace mode, which does not work under El Capitan.
It's very likely that you have something installed that is preventing the build (that the ntp autoconf is picking up). This caused build failures previously which you solved by building with trace mode under Yosemite (which hid them). Since trace mode doesn't work in El Capitan, you're seeing the old problem again.
I'll take a look at the new build log you uploaded and see if there's anything I can see going wrong there.
comment:13 Changed 9 years ago by danielluke (Daniel J. Luke)
Replying to dluke@…:
I'll take a look at the new build log you uploaded and see if there's anything I can see going wrong there.
I see two differences that are interesting:
1 - can you install macports openssl and attempt your build again and see if it succeeds? (my local build is opportunistically linking with openssl, the buildbots wouldn't have done so). I don't think this will fix it for you, but it's worth a shot. 2 - the configure script is finding -lelf for nlist on your system (:info:configure checking for library containing nlist... -lelf) - can you determine what libelf.dylib file is present, where it is, and what it's there for?
comment:14 Changed 9 years ago by danielluke (Daniel J. Luke)
I just committed a revision (r141000) that should fix this for you (force the configure script to not look for libelf). It also adds some dependencies that would otherwise be opportunistically linked in.
comment:15 Changed 9 years ago by jos@…
Amazing job! At last I can build ntp. I still don't understand why, but that is my problem.
I first tried to build with openssl but that wasn't enough, the other dependencies were indeed required. Libelf was a leftover from another install.
Now there are started two processes ntpd and after a few minutes one stops:
computer:~ jos$ ps auxwwww | grep ntpd jvdven 23143 0,0 0,0 2445076 796 s000 S+ 10:21pm 0:00.00 grep ntpd root 23141 0,0 0,0 2464536 496 ?? S 10:21pm 0:00.00 /opt/local/sbin/ntpd -n -g -p /opt/local/var/run/ntpd.pid -f /opt/local/var/db/ntp.drift -c /opt/local/etc/ntp.conf root 23140 0,0 0,0 2457368 2212 ?? S 10:21pm 0:00.01 /opt/local/sbin/ntpd -n -g -p /opt/local/var/run/ntpd.pid -f /opt/local/var/db/ntp.drift -c /opt/local/etc/ntp.conf root 23139 0,0 0,0 2462600 1432 ?? Ss 10:21pm 0:00.00 /opt/local/bin/daemondo --label=ntp --start-cmd /opt/local/sbin/ntpd -n -g -p /opt/local/var/run/ntpd.pid -f /opt/local/var/db/ntp.drift -c /opt/local/etc/ntp.conf ; --restart-netchange --pid=exec --restart-wakeup
And console says:
07-10-15 22:21:44,865 ntpd[23140]: ntpd 4.2.8p3@1.3265-o Wed Oct 7 19:32:18 UTC 2015 (1): Starting 07-10-15 22:21:44,872 ntpd[23140]: proto: fuzz beneath 0.071 usec 07-10-15 22:21:44,879 ntpd[23140]: mlockall(): Function not implemented 07-10-15 22:24:44,862 ntpd[23140]: error waiting on child 23141: No child processes
That is new for me and could this be a build error? I start ntp with "sudo port load ntp" and I have unloaded OSX version. Shall I open a new ticket for this one?
comment:16 Changed 9 years ago by jos@…
Follow up:
after a lot of testing I found out why I had two ntpd processes. I had defined a server name instead of IP address. Ntpd spawns a child process for DNS resolution.
Furthermore it is not necessary to have "ac_cv_search_nlist=no" and also libevent and libedit are not necessary.
Thanks for your help!
main.log