#55137 closed defect (fixed)
source-highlight 3.1.8_0.darwin_15.x86_64: Undefined symbols for architecture x86_64
Reported by: | hipunk | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.4.2 |
Keywords: | Cc: | ||
Port: | source-highlight |
Description
Hi,
I'm attempting to install source-highlight via MacPorts, but sadly the compilation fails. I added the terminal output into here and added the main.log file as an attachment. In the log file (at the bottom) it says "Undefined symbols for architecture x86_64" which then leads to an Error 2 and failure. It has to be installed as a dependency, that's when MP failed the first time. I installed it first without root from within port. The same error occurs when installing that package alone from within ports, with and without root and also when being passed an argument like "sudo port install source-highlight". I also have tried clean, with and without root privileges. Didn't fix it, issue persists.
$ sudo port install source-highlight ---> Computing dependencies for source-highlight ---> Fetching archive for source-highlight ---> Attempting to fetch source-highlight-3.1.8_0.darwin_15.x86_64.tbz2 from https://packages.macports.org/source-highlight ---> Attempting to fetch source-highlight-3.1.8_0.darwin_15.x86_64.tbz2 from http://fco.it.packages.macports.org/mirrors/macports-packages/source-highlight ---> Attempting to fetch source-highlight-3.1.8_0.darwin_15.x86_64.tbz2 from http://ywg.ca.packages.macports.org/mirror/macports/packages/source-highlight ---> Fetching distfiles for source-highlight ---> Verifying checksums for source-highlight ---> Extracting source-highlight ---> Configuring source-highlight ---> Building source-highlight Error: Failed to build source-highlight: command execution failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_textproc_source-highlight/source-highlight/main.log for details. Error: Follow https://guide.macports.org/#project.tickets to report a bug. Error: Processing of port source-highlight failed
OS is Mac OS X 10.11.6, MacPorts did not install anything before this - it was the first time being used on this installation. Xcode is 8.3.1. I tried updating, but only to find I'd need mAcOsXx1012 for that Xcode 8.3.3, so updating Xcode isn't an option. MacPorts is version 2.4.2.
If there is anything I can do to help or when there is additional info you need, just let me know, I will try to answer as quickly as possible. I cannot seem to decipher the problem by myself, help is greatly appreciated.
Attachments (1)
Change History (10)
Changed 7 years ago by hipunk
comment:1 Changed 7 years ago by hipunk
Cc: | hipunk added |
---|
comment:2 Changed 7 years ago by mf2k (Frank Schima)
Cc: | hipunk removed |
---|---|
Keywords: | elcapitan x86_64 removed |
The reporter is automatically Cc'ed.
comment:3 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to hipunk:
OS is Mac OS X 10.11.6, MacPorts did not install anything before this - it was the first time being used on this installation. Xcode is 8.3.1. I tried updating, but only to find I'd need mAcOsXx1012 for that Xcode 8.3.3, so updating Xcode isn't an option.
I trust you're using Xcode 8.2.1. Xcode 8.3 and later require macOS 10.12.
The log shows it is looking in /usr/local, which we don't want it to do. Do you have anything, such as a copy of boost, installed in /usr/local? If so, see wiki:FAQ#usrlocal.
comment:4 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
Owner: | set to ryandesign |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:5 follow-up: 6 Changed 7 years ago by hipunk
I'm terribly sorry, of course I meant Xcode 8.2.1 (8C1002), not 8.3.1, excuse me.
Indeed, there is a /usr/local directory and it contains a boost library. I assume it derives from having brew installed as well.
However, when I try to port using the -t flag, which apparently omits the /usr/local folders, the issue persists. I tried renaming /usr/local to /usr/localBAK, the issue persists.
Hmm, do you have an idea how I could temporarily fix this? By exporting some $PATH or something? I don't understand why it still fails when I rename /usr/local, so I'm out of ideas again. I understand, that I could modify the port in some way or another by using "--with-libfoo=/opt/local/lib/" (from the usrlocal FAQ), but I don't know where it expects its stuff to be in the first place...
I could try on a fresh new install of Mac OS X without brew, but I'm a bit too lazy for that right now (considering it's probably just some minor linking issue and not a bug in itself).
Thank you for your help! It is much appreciated.
Greetz,
hipunk
comment:6 follow-up: 7 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to hipunk:
Indeed, there is a /usr/local directory and it contains a boost library. I assume it derives from having brew installed as well.
Yes, that's a likely reason. This kind of problem is why we don't support having another package manager installed alongside MacPorts. It's best if you decide on one package manager to use and uninstall the other. Of course we'd love it if you chose MacPorts, and if there's anything we can do to help you choose MacPorts, let us know.
However, when I try to port using the -t flag, which apparently omits the /usr/local folders, the issue persists. I tried renaming /usr/local to /usr/localBAK, the issue persists.
I agree that either using the -t
flag or moving /usr/local aside should have been enough to work around this problem, provided in either case that you ran sudo port clean source-highlight
first. (On El Capitan and later, System Integrity Protection will prevent you from moving /usr/local, so I assume you've turned SIP off.)
Hmm, do you have an idea how I could temporarily fix this? By exporting some $PATH or something?
MacPorts deliberately does not honor your PATH
environment variable, to prevent interference from non-MacPorts software you may have installed. Instead, MacPorts sets its PATH
environment variable to the value of the binpath
setting in macports.conf. It is not recommended to change this setting; its default value should work correctly.
I don't understand why it still fails when I rename /usr/local, so I'm out of ideas again. I understand, that I could modify the port in some way or another by using "--with-libfoo=/opt/local/lib/" (from the usrlocal FAQ), but I don't know where it expects its stuff to be in the first place...
My commit shown above added the --with-boost=${prefix}
configure argument to the port, and should be enough to allow the port to find MacPorts boost, even if another boost is in /usr/local. Please sudo port clean source-highlight
, then use sudo port selfupdate
to receive that fix, then try installing the port again. If it fails again, please attach the new main.log (and the config.log in the work directory) so that we can see what else might be going on.
comment:7 follow-up: 9 Changed 7 years ago by hipunk
Replying to ryandesign:
Replying to hipunk:
Indeed, there is a /usr/local directory and it contains a boost library. I assume it derives from having brew installed as well.
Yes, that's a likely reason. This kind of problem is why we don't support having another package manager installed alongside MacPorts. It's best if you decide on one package manager to use and uninstall the other. Of course we'd love it if you chose MacPorts, and if there's anything we can do to help you choose MacPorts, let us know.
No worries, I've been a year long user of MacPorts and fink, way before brew even existed. I only installed it because I couldn't find some package on MacPorts or fink (I don't even recall which one it was, sorry). For now, I'll try having all of them on board, but now I'm aware of the issues that might arise from that decision. This was mostly my fault - I willingly ignored all warnings of having them all.
I assume you've turned SIP off.)
Yes, that is correct.
Hmm, do you have an idea how I could temporarily fix this? By exporting some $PATH or something?
MacPorts deliberately does not honor your
PATH
environment variable, to prevent interference from non-MacPorts software you may have installed. Instead, MacPorts sets itsPATH
environment variable to the value of thebinpath
setting in macports.conf. It is not recommended to change this setting; its default value should work correctly.
That is very good to know, I will try to memorize that.
I don't understand why it still fails when I rename /usr/local, so I'm out of ideas again. I understand, that I could modify the port in some way or another by using "--with-libfoo=/opt/local/lib/" (from the usrlocal FAQ), but I don't know where it expects its stuff to be in the first place...
My commit shown above added the
--with-boost=${prefix}
configure argument to the port, and should be enough to allow the port to find MacPorts boost, even if another boost is in /usr/local. Pleasesudo port clean source-highlight
, then usesudo port selfupdate
to receive that fix, then try installing the port again. If it fails again, please attach the new main.log (and the config.log in the work directory) so that we can see what else might be going on.
You are absolutely awesome! You fixed it, now it compiles just fine. Thank you so much for your help, I am so happy right now. Just look what you made possible for me: http://www.hipunk.net/other/MacPortsIsFreakingAwesome.png Linux on the left, Darwin on the right. w00t!
Thanks again, have a wonderful day/night and greetz,
hipunk
comment:8 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
comment:9 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to hipunk:
Thank you so much for your help, I am so happy right now. Just look what you made possible for me: http://www.hipunk.net/other/MacPortsIsFreakingAwesome.png Linux on the left, Darwin on the right. w00t!
Great! Looks like we should update Thunar; I filed #55156 for that.
main.log logfile out of the source-highlight log directory.