Opened 7 years ago
Closed 7 years ago
#56085 closed defect (fixed)
source-highlight @3.1.8_4+universal: Undefined symbols for architecture i386
Reported by: | rpspringuel (Fr. Samuel Springuel) | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.4.2 |
Keywords: | Cc: | Ionic (Mihai Moldovan) | |
Port: | source-highlight |
Description
I attempted to upgrade from source-highlight 3.1.8_2 to 3.1.8_4 today and encountered a build error (command execution failed). Attached is the log.
Attachments (1)
Change History (10)
Changed 7 years ago by rpspringuel (Fr. Samuel Springuel)
comment:1 Changed 7 years ago by mf2k (Frank Schima)
comment:2 Changed 7 years ago by kencu (Ken)
looks like you're trying to build it +universal, and some of the parts have not been built that way. There's probably no reason to build it +universal, I would say. Why don't you try building it without universal, possibly forcing that choice by -universal, and see if it's happier that way.
Either that, or see if you find out which things are build +universal, and which are not, and fix the ones that are not +universal.
comment:3 Changed 7 years ago by rpspringuel (Fr. Samuel Springuel)
So after studying my installation trying to figure out where the non-universal dependency was, I discovered that source-highlight itself was a 2nd-level leave for me, not a dependency. At some point I must have installed something that depended on gtk-doc (and which probably invoked the +universal variant), but whatever it was, I don't have it installed any more. As a result I've just removed the leave. If I find the time I'll go back and try and figure out the problem further, but since I don't actually need it, and I have a whole lot of other things on my plate, that might take a while.
comment:4 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
We can see in the log that this line is invoking the compiler without specifying the necessary -arch
and -stdlib
flags:
:info:build libtool: link: /usr/bin/clang++ -r -keep_private_externs -nostdlib -o .libs/libsource-highlight.4.dylib-master.o .libs/fileutil.o .libs/substfun.o .libs/stopwatch.o .libs/utils.o .libs/ioexception.o .libs/settings.o .libs/versions.o .libs/verbosity.o .libs/sourcehighlight.o .libs/styleparser.o .libs/stylescanner.o .libs/outlangdefparser.o .libs/stylecssparser.o .libs/stylecssscanner.o .libs/outlangdefscanner.o .libs/debuglistener.o .libs/langmap.o .libs/stylefileparser.o .libs/langelem.o .libs/statelangelem.o .libs/langelems.o .libs/statestartlangelem.o .libs/stringlistlangelem.o .libs/delimitedlangelem.o .libs/langelemsprinter.o .libs/namedsubexpslangelem.o .libs/stringdef.o .libs/highlightrule.o .libs/highlighttoken.o .libs/highlightstate.o .libs/highlightrulefactory.o .libs/highlightstateprinter.o .libs/sourcehighlighter.o .libs/sourcefilehighlighter.o .libs/linenumgenerator.o .libs/lineranges.o .libs/regexranges.o .libs/formatter.o .libs/formattermanager.o .libs/textstyle.o .libs/textstyleformatter.o .libs/bufferedoutput.o .libs/preformatter.o .libs/wordtokenizer.o .libs/ctagscollector.o .libs/readtags.o .libs/ctagsformatter.o .libs/srcuntabifier.o .libs/textstyleformatterfactory.o .libs/docgenerator.o .libs/doctemplate.o .libs/chartranslator.o .libs/textstylebuilder.o .libs/fileinfo.o .libs/ctagsmanager.o .libs/regexhighlightrule.o .libs/regexrulefactory.o .libs/regexpreprocessor.o .libs/highlightstatebuilder.o .libs/highlightbuilderexception.o .libs/langdefmanager.o .libs/langdefparser.o .libs/langdefscanner.o .libs/languageinfer.o .libs/parserexception.o .libs/stringtable.o .libs/vardefinitions.o .libs/sourcehighlightutils.o .libs/instances.o .libs/yywrap.o .libs/libsource-highlight.lax/libgnu.a/basename-lgpl.o .libs/libsource-highlight.lax/libgnu.a/dirname-lgpl.o .libs/libsource-highlight.lax/libgnu.a/getopt.o .libs/libsource-highlight.lax/libgnu.a/getopt1.o .libs/libsource-highlight.lax/libgnu.a/progname.o .libs/libsource-highlight.lax/libgnu.a/stripslash.o
comment:5 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
Summary: | source-highlight @ 3.1.8_4 - build error → source-highlight @3.1.8_4+universal: Undefined symbols for architecture i386 |
---|
comment:6 Changed 7 years ago by jmroot (Joshua Root)
Cc: | Ionic added |
---|
comment:7 Changed 7 years ago by Ionic (Mihai Moldovan)
We can see in the log that this line is invoking the compiler without specifying the necessary
-arch
and-stdlib
flags:
The -stdlib
flag shouldn't be necessary. Note that this call is merely merging multiple object files into one big one (and skipping linking against other libraries, including a standard library, explicitly via -nostdlib
).
It's questionable why libtool would link individual object files into a big one prior to creating the dylib, but we'll have to live with that behavior.
Creating object files with -r
and without -arch
flags will however only leave default-arch symbols in the resulting thin object file - exactly what is happening here.
The question thus is why libtool is dropping -arch
flags from this linking call exactly. It does use -arch flags for other link operations, so it's unlikely to be caused by its intentional dropping of unknown LDFLAGS
.
Changing to the muniversal
PortGroup
likely won't help either, since the i386 build objects would likewise be dropped within the i386 build process.
comment:8 Changed 7 years ago by jmroot (Joshua Root)
Can you please see if [17ff20b97ea77403492e1bad7beb153f0e6c8312/macports-ports] has helped with this?
comment:9 Changed 7 years ago by jmroot (Joshua Root)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Confirmed fixed by another affected user on IRC.
Error is: