YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

New Topic Post Reply
Squirrel 3.0.6 Link Error on Mac OS X
grabiller
#1 Posted : Tuesday, April 22, 2014 8:56:24 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/22/2014(UTC)
Posts: 1

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
Hello,

While I've successfully compiled Squirrel 3.0.6 on Windows and Linux, I get an linker error on Mac OS X:

ld: internal error: atom not found in symbolIndex(__ZN10SQInstance3GetERK11SQObjectPtrRS0_) for architecture x86_64

Any idea what I should do ?

Thanks in advance.

Cheers,
Guy.
fagiano
#2 Posted : Friday, May 23, 2014 12:26:13 PM(UTC)
Rank: Advanced Member

Groups: Registered, Administrators
Joined: 6/11/2005(UTC)
Posts: 1,056

Thanks: 0 times
Was thanked: 78 time(s) in 60 post(s)
mmh,I succesfully compiled squirrel on Mac using the provided Makefiles. have you done "make sq64"?

Alberto
Follow me on Twitter @squirrellang
caecus314
#3 Posted : Saturday, September 20, 2014 5:30:35 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 9/20/2014(UTC)
Posts: 5
Location: San Francisco

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
Squirrel looks amazing! As a fan of Lua who is frustrated by many of its quirks, I can't wait to give Squirrel a try. Unfortunately, I've hit the same issue on my Macbook Pro. Any idea what I should do?

Here's what I get when I try to compile:




aarons-mbp:SQUIRREL3 aaronbarrett$ make
cd squirrel; make
gcc -O2 -fno-exceptions -fno-rtti -Wall -fno-strict-aliasing -c sqapi.cpp sqbaselib.cpp sqfuncstate.cpp sqdebug.cpp sqlexer.cpp sqobject.cpp sqcompiler.cpp sqstate.cpp sqtable.cpp sqmem.cpp sqvm.cpp sqclass.cpp -I../include -I. -Iinclude
sqcompiler.cpp:83:23: warning: implicit conversion of NULL constant to 'SQChar' (aka 'char') [-Wnull-conversion]
_compilererror[0] = NULL;
~ ^~~~
'\0'
1 warning generated.
ar rc ../lib/libsquirrel.a *.o
rm *.o
cd sqstdlib; make
gcc -O2 -fno-exceptions -fno-rtti -Wall -fno-strict-aliasing -c sqstdblob.cpp sqstdio.cpp sqstdstream.cpp sqstdmath.cpp sqstdsystem.cpp sqstdstring.cpp sqstdaux.cpp sqstdrex.cpp -I../include -I. -Iinclude
ar rc ../lib/libsqstdlib.a *.o
rm *.o
cd sq; make
g++ -O2 -s -fno-exceptions -fno-rtti -o ../bin/sq sq.c -I../include -I. -I../sqlibs -L../lib -lsquirrel -lsqstdlib
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated
ld: warning: option -s is obsolete and being ignored
ld: internal error: atom not found in symbolIndex(__ZN10SQInstance3GetERK11SQObjectPtrRS0_) for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [sq32] Error 1
make: *** [sq32] Error 2





aarons-mbp:SQUIRREL3 aaronbarrett$ make sq64
cd squirrel; make sq64
gcc -O2 -m64 -D_SQ64 -fno-exceptions -fno-rtti -Wall -fno-strict-aliasing -c sqapi.cpp sqbaselib.cpp sqfuncstate.cpp sqdebug.cpp sqlexer.cpp sqobject.cpp sqcompiler.cpp sqstate.cpp sqtable.cpp sqmem.cpp sqvm.cpp sqclass.cpp -I../include -I. -Iinclude
sqcompiler.cpp:83:23: warning: implicit conversion of NULL constant to 'SQChar' (aka 'char') [-Wnull-conversion]
_compilererror[0] = NULL;
~ ^~~~
'\0'
1 warning generated.
ar rc ../lib/libsquirrel.a *.o
rm *.o
cd sqstdlib; make sq64
gcc -O2 -m64 -fno-exceptions -D_SQ64 -fno-rtti -Wall -fno-strict-aliasing -c sqstdblob.cpp sqstdio.cpp sqstdstream.cpp sqstdmath.cpp sqstdsystem.cpp sqstdstring.cpp sqstdaux.cpp sqstdrex.cpp -I../include -I. -Iinclude
ar rc ../lib/libsqstdlib.a *.o
rm *.o
cd sq; make sq64
g++ -O2 -s -m64 -fno-exceptions -fno-rtti -D_SQ64 -o ../bin/sq sq.c -I../include -I. -I../sqlibs -L../lib -lsquirrel -lsqstdlib
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated
ld: warning: option -s is obsolete and being ignored
ld: internal error: atom not found in symbolIndex(__ZN10SQInstance3GetERK11SQObjectPtrRS0_) for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [sq64] Error 1
make: *** [sq64] Error 2




Thanks for your help!

-Aaron
caecus314
#4 Posted : Tuesday, September 23, 2014 4:18:58 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 9/20/2014(UTC)
Posts: 5
Location: San Francisco

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
Update: I wasn't able to get 'make' to work, so I tried copying all of the files into an Xcode project. I had to make some slight changes (mostly just changing lots of #include "quotes" to #include <angleds> ), but I was able to compile 'sq'! I've had a lot of fun messing around with it so far.

Alberto, if you're not opposed, I'd like to make the Xcode project and the OSX 'sq' binary available for anyone to download. I know I would have had a much easier time getting started if the binary were available online somewhere.

This language is even better than I expected. I'm really impressed that all of the source code fits in just a few files. Nice work, Alberto!
fagiano
#5 Posted : Friday, September 26, 2014 10:55:41 PM(UTC)
Rank: Advanced Member

Groups: Registered, Administrators
Joined: 6/11/2005(UTC)
Posts: 1,056

Thanks: 0 times
Was thanked: 78 time(s) in 60 post(s)
Mhh, I'll investigate the makefile on Mac again. Maybe is something to do with a newer compiler than the one I tested. Anyway, feel free to redistribute your XCode project.

Alberto
Follow me on Twitter @squirrellang
caecus314
#6 Posted : Friday, October 3, 2014 1:28:00 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 9/20/2014(UTC)
Posts: 5
Location: San Francisco

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
That's great! I'll post the project and the binary as soon as I get a chance. I'm also hoping to write up some simple tutorials once I get a better understanding of the language.

-Aaron
Guest
#7 Posted : Thursday, October 16, 2014 8:25:51 PM(UTC)
Rank: Guest

Groups:
Joined: 7/25/2010(UTC)
Posts: 20

Thanks: 0 times
Was thanked: 1 time(s) in 1 post(s)
To build on Darwin Kernel Version 13.4.0: Sun Aug 17 19:50:11 PDT 2014; root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64 with this gcc -v:

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.51) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix


I had to remove the "-s" option in the sq/Makefile. Otherwise I got the same error about __ZN10SQInstance3GetERK11SQObjectPtrRS0_ as the original poster.

Hope this is useful to someone.
dpharris
#8 Posted : Tuesday, December 30, 2014 9:15:02 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 12/30/2014(UTC)
Posts: 1
Location: Victoria,BC

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
Thanks, that worked. I had to edit a line in sq/Makefile ... I changed the 'sq64' line as that is what I built.
David
Quick Reply Show Quick Reply
Users browsing this topic
Guest
New Topic Post Reply
Forum Jump  
You can post new topics in this forum.
You can reply to topics in this forum.
You can delete your posts in this forum.
You can edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.

Clean Slate theme by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.4 | YAF © 2003-2010, Yet Another Forum.NET
This page was generated in 0.212 seconds.