32-bit builds?

Brandon Allbery allbery.b at gmail.com
Thu Nov 26 07:45:35 PST 2015


On Thu, Nov 26, 2015 at 10:40 AM, Mark Brethen <mark.brethen at gmail.com>
wrote:

> The link error occurs here:
>
> :info:build /usr/bin/clang++ -c -o astgen.o astgen.cc -g -Wall
> -Wno-deprecated -D__UNIX__ -O2 -DNDEBUG -I../smbase
> :info:build /usr/bin/clang++ -o astgen gramlex.o agrampar.tab.o ccsstr.o
> agramlex.yy.o reporterr.o embedded.o ast.hand.o asthelp.o xmlhelp.o
> agrampar.o astgen.o -g -Wall -Werror ../smbase/libsmbase.a
> :info:build Undefined symbols for architecture x86_64:
> :info:build   "agrampar_yyerror(void*, char const*)", referenced from:
> :info:build       agrampar_yyparse(void*) in agrampar.tab.o
> :info:build   "StringTable::add(char const*)", referenced from:
> :info:build       GrammarLexer::yylexInc() in gramlex.o
> :info:build       GrammarLexer::curFuncBody() const in gramlex.o
> :info:build       GrammarLexer::curToken() const in gramlex.o
> :info:build       GrammarLexer::addString(char*, int) const in gramlex.o
> :info:build       GrammarLexer::curDeclName() const in gramlex.o
> :info:build   "StringTable::StringTable()", referenced from:
> :info:build       __GLOBAL__sub_I_agrampar.cc in agrampar.o
> :info:build   "StringTable::~StringTable()", referenced from:
> :info:build       __GLOBAL__sub_I_agrampar.cc in agrampar.o
>
> It seems like its not finding the object files, which are part of the
> build in ../ast.
>

It hasn't been told to look there; did you expect it to go hunting on its
own? I suspect there's a .a file in there that needs to be explicitly
linked the same way libsmbase.a is.

I also see no reason to consider this a 32 vs. 64 bit issue. Apple's ld has
reported the arch, even when it's not relevant, for several years now.

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-dev/attachments/20151126/68df9b39/attachment-0001.html>


More information about the macports-dev mailing list