Mac OS X compilation

Forum closed. All further discussion to be discussed at https://github.com/OpenKore/

Moderator: Moderators

Message
Author
stitch
Noob
Noob
Posts: 4
Joined: 12 Mar 2011, 04:48
Noob?: No

Mac OS X compilation

#1 Post by stitch »

i am currently using Mac OS X v10.6.6 (Snow Leopard)
i have updated my perl to 5.12.3 because the default perl (5.10.0) have problems with @INC

now, i got this problem when trying to compile.

Code: Select all

 Checking Perl configuration ...(cached) yes
Checking for C library ncurses... (cached) yes
Checking for GNU readline 4.3 or higher...(cached) yes
Checking for C library readline.5... (cached) no
Checking whether Readline 5 is available... no
SCons.Script:132: DeprecationWarning: os.popen3 is deprecated.  Use the subprocess module.
Checking for libcurl...(cached) libcurl 7.19.7
scons: done reading SConscript files.
scons: Building targets ...
g++ -o src/auto/XSTools/PaddedPackets/PaddedPackets.xs.os -c -Wall -g -O2 -pipe -no-cpp-precomp -DPERL_DARWIN -fno-strict-aliasing -DVERSION=\"1.0\" -DXS_VERSION=\"1.0\" -Wall -g -O2 -pipe -no-cpp-precomp -DPERL_DARWIN -fno-strict-aliasing -DVERSION=\"1.0\" -DXS_VERSION=\"1.0\" -fPIC -I/usr/include -I/usr/local/include -I/sw/include -I/usr/local/ActivePerl-5.12/lib/CORE src/auto/XSTools/PaddedPackets/PaddedPackets.xs.cpp
src/auto/XSTools/PaddedPackets/PaddedPackets.c: In function 'void XS_Network__PaddedPackets_createSitStand(PerlInterpreter*, CV*)':
src/auto/XSTools/PaddedPackets/PaddedPackets.c:35: warning: unused variable 'Perl___notused'
src/auto/XSTools/PaddedPackets/PaddedPackets.c: In function 'void XS_Network__PaddedPackets_createAtk(PerlInterpreter*, CV*)':
src/auto/XSTools/PaddedPackets/PaddedPackets.c:63: warning: unused variable 'Perl___notused'
src/auto/XSTools/PaddedPackets/PaddedPackets.c: In function 'void XS_Network__PaddedPackets_createSkillUse(PerlInterpreter*, CV*)':
src/auto/XSTools/PaddedPackets/PaddedPackets.c:92: warning: unused variable 'Perl___notused'
src/auto/XSTools/PaddedPackets/PaddedPackets.c: In function 'void XS_Network__PaddedPackets_setMapSync(PerlInterpreter*, CV*)':
src/auto/XSTools/PaddedPackets/PaddedPackets.c:122: warning: unused variable 'Perl___notused'
src/auto/XSTools/PaddedPackets/PaddedPackets.c: In function 'void XS_Network__PaddedPackets_setSync(PerlInterpreter*, CV*)':
src/auto/XSTools/PaddedPackets/PaddedPackets.c:143: warning: unused variable 'Perl___notused'
src/auto/XSTools/PaddedPackets/PaddedPackets.c: In function 'void XS_Network__PaddedPackets_setAccountId(PerlInterpreter*, CV*)':
src/auto/XSTools/PaddedPackets/PaddedPackets.c:164: warning: unused variable 'Perl___notused'
src/auto/XSTools/PaddedPackets/PaddedPackets.c: In function 'void XS_Network__PaddedPackets_setPacket(PerlInterpreter*, CV*)':
src/auto/XSTools/PaddedPackets/PaddedPackets.c:185: warning: unused variable 'Perl___notused'
src/auto/XSTools/PaddedPackets/PaddedPackets.c: In function 'void XS_Network__PaddedPackets_setPacketIDs(PerlInterpreter*, CV*)':
src/auto/XSTools/PaddedPackets/PaddedPackets.c:209: warning: unused variable 'Perl___notused'
src/auto/XSTools/PaddedPackets/PaddedPackets.c: In function 'void XS_Network__PaddedPackets_decodePacket(PerlInterpreter*, CV*)':
src/auto/XSTools/PaddedPackets/PaddedPackets.c:232: warning: unused variable 'Perl___notused'
src/auto/XSTools/PaddedPackets/PaddedPackets.c: In function 'void XS_Network__PaddedPackets_getKey(PerlInterpreter*, CV*)':
src/auto/XSTools/PaddedPackets/PaddedPackets.c:254: warning: unused variable 'Perl___notused'
src/auto/XSTools/PaddedPackets/PaddedPackets.c: In function 'void boot_Network__PaddedPackets(PerlInterpreter*, CV*)':
src/auto/XSTools/PaddedPackets/PaddedPackets.c:284: warning: deprecated conversion from string constant to 'char*'
src/auto/XSTools/PaddedPackets/PaddedPackets.c:280: warning: unused variable 'Perl___notused'
g++ -o src/test/consoleui-test src/test/consoleui-test.o src/auto/XSTools/unix/consoleui.o -lreadline -lpthread -lncurses
Undefined symbols:
  "_rl_on_new_line", referenced from:
      ConsoleUI::processOutput()      in consoleui.o
  "_rl_set_prompt", referenced from:
      ConsoleUI::processOutput()      in consoleui.o
      ConsoleUI::processOutput()      in consoleui.o
      ConsoleUI::processOutput()      in consoleui.o
      ConsoleUI::processOutput()      in consoleui.o
      ConsoleUI::threadMain(void*)  in consoleui.o
  "_rl_display_prompt", referenced from:
      ConsoleUI::processOutput()      in consoleui.o
      ConsoleUI::processOutput()      in consoleui.o
      ConsoleUI::processOutput()      in consoleui.o
      ConsoleUI::threadMain(void*)  in consoleui.o
  "_rl_replace_line", referenced from:
      ConsoleUI::processOutput()      in consoleui.o
      ConsoleUI::processOutput()      in consoleui.o
  "_rl_mark", referenced from:
      ConsoleUI::processOutput()      in consoleui.o
      ConsoleUI::processOutput()      in consoleui.o
      ConsoleUI::processOutput()      in consoleui.o
      ConsoleUI::processOutput()      in consoleui.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
scons: *** [src/test/consoleui-test] Error 1
scons: building terminated because of errors.
-e \e[1;31mCompilation failed. Please read http://www.openkore.com/compilation.php for help.\e[0m
Can't load '/Users/syaheer92/Desktop/openkore-2.0.7/src/auto/XSTools/XSTools.bundle' for module XSTools: dlopen(/Users/syaheer92/Desktop/openkore-2.0.7/src/auto/XSTools/XSTools.bundle, 1): no suitable image found.  Did find:
	/Users/syaheer92/Desktop/openkore-2.0.7/src/auto/XSTools/XSTools.bundle: mach-o, but wrong architecture at /usr/local/ActivePerl-5.12/lib/XSLoader.pm line 73.
 at /Users/syaheer92/Desktop/openkore-2.0.7/src/XSTools.pm line 45
Muhamad-Syahir-Amir-Sazalis-MacBook:~ syaheer92$ 
i an totally lost at this. could someone please help me? ur help is highly appreciated. thanks.

User avatar
kLabMouse
Administrator
Administrator
Posts: 1301
Joined: 24 Apr 2008, 12:02

Re: Another compilation error

#2 Post by kLabMouse »

it' s a problem with 'Readline'.
You where using the Mac OS X buildin.

stitch
Noob
Noob
Posts: 4
Joined: 12 Mar 2011, 04:48
Noob?: No

Re: Another compilation error

#3 Post by stitch »

can you teach me how to use the readline that ive installed instead of using the buildin one?
ive installed readline 6.2 btw

lirik
Noob
Noob
Posts: 1
Joined: 19 Mar 2011, 07:01
Noob?: Yes

Re: Another compilation error

#4 Post by lirik »

kLabMouse wrote:it' s a problem with 'Readline'.
You where using the Mac OS X buildin.
Same issue for me... But I have the latest version of Readline installed.
Here is my log:

Code: Select all

http://pastebin.com/JFMcP9wG
Please help! Thank you very much!

stitch
Noob
Noob
Posts: 4
Joined: 12 Mar 2011, 04:48
Noob?: No

Re: Another compilation error

#5 Post by stitch »

Hi, first of all, thanks for the reply.

Can you teach me how to change the readline path so that it uses the readline that i have installed? i have installed readline 6.2 which is the latest one btw. i have been searching all over the web but i cannot find the solution to it.

help :(

User avatar
kLabMouse
Administrator
Administrator
Posts: 1301
Joined: 24 Apr 2008, 12:02

Re: Another compilation error

#6 Post by kLabMouse »

stitch wrote:Hi, first of all, thanks for the reply.

Can you teach me how to change the readline path so that it uses the readline that i have installed? i have installed readline 6.2 which is the latest one btw. i have been searching all over the web but i cannot find the solution to it.

help :(
OS and it's Version?

stitch
Noob
Noob
Posts: 4
Joined: 12 Mar 2011, 04:48
Noob?: No

Re: Another compilation error

#7 Post by stitch »

im using Mac OSX Snow Leopard 10.6.6

unreal
Noob
Noob
Posts: 10
Joined: 20 Apr 2008, 04:36
Noob?: No

Re: Another compilation error

#8 Post by unreal »

I tried to compile openkore on MacOSX 10.6.7 and readline 6.2, have the same problem.
I made some changes to help openkore use readline 6.2 in SConstruct
From:

Code: Select all

	
if darwin:
		has_readline_5 = conf.CheckLib('readline.5')
		sys.stdout.write('Checking whether Readline 5 is available...')
		sys.stdout.flush
		if has_readline_5:
			READLINE_LIB = 'readline.5'
			sys.stdout.write(" yes\n")
		else:
			sys.stdout.write(" no\n")
To:

Code: Select all

	if darwin:
		has_readline_5 = conf.CheckLib('readline.6.2')
		sys.stdout.write('Checking whether Readline 6.2 is available...')
		sys.stdout.flush
		if has_readline_5:
			READLINE_LIB = 'readline.6.2'
			sys.stdout.write(" yes\n")
		else:
			sys.stdout.write(" no\n")
But still have error:

Code: Select all

Checking Perl configuration ...(cached) yes
Checking for C library ncurses... (cached) yes
Checking for GNU readline 4.3 or higher...(cached) yes
Checking for C library readline.6.2... yes
Checking whether Readline 6.2 is available... yes
Checking for libcurl...(cached) libcurl 7.19.7
scons: done reading SConscript files.
scons: Building targets ...
g++ -o src/test/consoleui-test src/test/consoleui-test.o src/auto/XSTools/unix/consoleui.o -lreadline.6.2 -lpthread -lncurses
scons: done building targets.
Can't load '/Users/unreal/Gaming/openkore_ready/src/auto/XSTools/XSTools.bundle' for module XSTools: dlopen(/Users/unreal/Gaming/openkore_ready/src/auto/XSTools/XSTools.bundle, 1): Symbol not found: _rl_display_prompt
  Referenced from: /Users/unreal/Gaming/openkore_ready/src/auto/XSTools/XSTools.bundle
  Expected in: flat namespace
 in /Users/unreal/Gaming/openkore_ready/src/auto/XSTools/XSTools.bundle at /System/Library/Perl/5.10.0/darwin-thread-multi-2level/XSLoader.pm line 67.
 at /Users/unreal/Gaming/openkore_ready/src/XSTools.pm line 45
I have tried to use readline 6.1 but it's still the same. Tried to compile readline 5.2 but it was fail also (searched & tried someway to resolve compiling error but it didn't bring any result)
Image
Image
Image

unreal
Noob
Noob
Posts: 10
Joined: 20 Apr 2008, 04:36
Noob?: No

Re: Another compilation error

#9 Post by unreal »

I have just compiled openkore successfully. There was error because I didn't clean the make after changing the SConstruct. So the way to solve this problem is change the SConstruct as i posted then

Code: Select all

make clean
and run openkore again :D.
Image
Image
Image

Coquelicot
Noob
Noob
Posts: 1
Joined: 03 May 2011, 19:13
Noob?: No

Re: Another compilation error

#10 Post by Coquelicot »

I'm getting a very similar issue on OSX 10.6.7. I seem to have all of the prerequisites installed, and I've modified the SConstruct file as Unreal has suggested, but I still end up with

Code: Select all

lappy:ok coquhome$ perl ./openkore.pl
scons: Reading SConscript files ...
Checking Perl configuration ...(cached) yes
Checking for C library ncurses... yes
Checking for GNU readline 4.3 or higher...yes
Checking for C library readline.6.2... yes
Checking whether Readline 6.2 is available... yes
Checking for libcurl...(cached) libcurl 7.19.7
scons: done reading SConscript files.
scons: Building targets ...
g++ -o src/auto/XSTools/PaddedPackets/Algorithms/algorithms.os -c -Wall -O3 -pipe -no-cpp-precomp -DPERL_DARWIN -fno-strict-aliasing -DVERSION=\"1.0\" -DXS_VERSION=\"1.0\" -Wall -O3 -pipe -no-cpp-precomp -DPERL_DARWIN -fno-strict-aliasing -DVERSION=\"1.0\" -DXS_VERSION=\"1.0\" -fPIC -I/usr/include -I/usr/local/include -I/sw/include -I/Library/Perl/Updates/5.10.0/darwin-thread-multi-2level/CORE src/auto/XSTools/PaddedPackets/Algorithms/algorithms.cpp
g++ -o src/auto/XSTools/PaddedPackets/Algorithms/cast.os -c -Wall -O3 -pipe -no-cpp-precomp -DPERL_DARWIN -fno-strict-aliasing -DVERSION=\"1.0\" -DXS_VERSION=\"1.0\" -fPIC -I/usr/include -I/usr/local/include -I/sw/include -I/Library/Perl/Updates/5.10.0/darwin-thread-multi-2level/CORE src/auto/XSTools/PaddedPackets/Algorithms/cast.c
g++ -o src/auto/XSTools/PaddedPackets/Algorithms/feal8.os -c -Wall -O3 -pipe -no-cpp-precomp -DPERL_DARWIN -fno-strict-aliasing -DVERSION=\"1.0\" -DXS_VERSION=\"1.0\" -fPIC -I/usr/include -I/usr/local/include -I/sw/include -I/Library/Perl/Updates/5.10.0/darwin-thread-multi-2level/CORE src/auto/XSTools/PaddedPackets/Algorithms/feal8.c
g++ -o src/auto/XSTools/PaddedPackets/Algorithms/mcg_cipher.os -c -Wall -O3 -pipe -no-cpp-precomp -DPERL_DARWIN -fno-strict-aliasing -DVERSION=\"1.0\" -DXS_VERSION=\"1.0\" -fPIC -I/usr/include -I/usr/local/include -I/sw/include -I/Library/Perl/Updates/5.10.0/darwin-thread-multi-2level/CORE src/auto/XSTools/PaddedPackets/Algorithms/mcg_cipher.c
g++ -o src/auto/XSTools/PaddedPackets/Algorithms/misty1.os -c -Wall -O3 -pipe -no-cpp-precomp -DPERL_DARWIN -fno-strict-aliasing -DVERSION=\"1.0\" -DXS_VERSION=\"1.0\" -fPIC -I/usr/include -I/usr/local/include -I/sw/include -I/Library/Perl/Updates/5.10.0/darwin-thread-multi-2level/CORE src/auto/XSTools/PaddedPackets/Algorithms/misty1.c
g++ -o src/auto/XSTools/PaddedPackets/Algorithms/rmd128.os -c -Wall -O3 -pipe -no-cpp-precomp -DPERL_DARWIN -fno-strict-aliasing -DVERSION=\"1.0\" -DXS_VERSION=\"1.0\" -fPIC -I/usr/include -I/usr/local/include -I/sw/include -I/Library/Perl/Updates/5.10.0/darwin-thread-multi-2level/CORE src/auto/XSTools/PaddedPackets/Algorithms/rmd128.c
g++ -o src/auto/XSTools/PaddedPackets/Algorithms/safer.os -c -Wall -O3 -pipe -no-cpp-precomp -DPERL_DARWIN -fno-strict-aliasing -DVERSION=\"1.0\" -DXS_VERSION=\"1.0\" -fPIC -I/usr/include -I/usr/local/include -I/sw/include -I/Library/Perl/Updates/5.10.0/darwin-thread-multi-2level/CORE src/auto/XSTools/PaddedPackets/Algorithms/safer.c
g++ -o src/auto/XSTools/PaddedPackets/Algorithms/seal.os -c -Wall -O3 -pipe -no-cpp-precomp -DPERL_DARWIN -fno-strict-aliasing -DVERSION=\"1.0\" -DXS_VERSION=\"1.0\" -fPIC -I/usr/include -I/usr/local/include -I/sw/include -I/Library/Perl/Updates/5.10.0/darwin-thread-multi-2level/CORE src/auto/XSTools/PaddedPackets/Algorithms/seal.c
g++ -o src/auto/XSTools/PaddedPackets/Algorithms/snefru.os -c -Wall -O3 -pipe -no-cpp-precomp -DPERL_DARWIN -fno-strict-aliasing -DVERSION=\"1.0\" -DXS_VERSION=\"1.0\" -fPIC -I/usr/include -I/usr/local/include -I/sw/include -I/Library/Perl/Updates/5.10.0/darwin-thread-multi-2level/CORE src/auto/XSTools/PaddedPackets/Algorithms/snefru.c
g++ -o src/auto/XSTools/PaddedPackets/Algorithms/tiger.os -c -Wall -O3 -pipe -no-cpp-precomp -DPERL_DARWIN -fno-strict-aliasing -DVERSION=\"1.0\" -DXS_VERSION=\"1.0\" -fPIC -I/usr/include -I/usr/local/include -I/sw/include -I/Library/Perl/Updates/5.10.0/darwin-thread-multi-2level/CORE src/auto/XSTools/PaddedPackets/Algorithms/tiger.c
g++ -o src/auto/XSTools/PaddedPackets/Algorithms/turtle.os -c -Wall -O3 -pipe -no-cpp-precomp -DPERL_DARWIN -fno-strict-aliasing -DVERSION=\"1.0\" -DXS_VERSION=\"1.0\" -fPIC -I/usr/include -I/usr/local/include -I/sw/include -I/Library/Perl/Updates/5.10.0/darwin-thread-multi-2level/CORE src/auto/XSTools/PaddedPackets/Algorithms/turtle.c
buildXS(["src/auto/XSTools/PaddedPackets/PaddedPackets.xs.cpp"], ["src/auto/XSTools/PaddedPackets/PaddedPackets.xs"])
Creating src/auto/XSTools/PaddedPackets/PaddedPackets.xs.cpp ...
g++ -o src/auto/XSTools/PaddedPackets/PaddedPackets.xs.os -c -Wall -O3 -pipe -no-cpp-precomp -DPERL_DARWIN -fno-strict-aliasing -DVERSION=\"1.0\" -DXS_VERSION=\"1.0\" -Wall -O3 -pipe -no-cpp-precomp -DPERL_DARWIN -fno-strict-aliasing -DVERSION=\"1.0\" -DXS_VERSION=\"1.0\" -fPIC -I/usr/include -I/usr/local/include -I/sw/include -I/Library/Perl/Updates/5.10.0/darwin-thread-multi-2level/CORE src/auto/XSTools/PaddedPackets/PaddedPackets.xs.cpp
src/auto/XSTools/PaddedPackets/PaddedPackets.xs:1:20: error: EXTERN.h: No such file or directory
src/auto/XSTools/PaddedPackets/PaddedPackets.xs:2:18: error: perl.h: No such file or directory
src/auto/XSTools/PaddedPackets/PaddedPackets.xs:3:18: error: XSUB.h: No such file or directory
src/auto/XSTools/PaddedPackets/PaddedPackets.c:31: error: expected constructor, destructor, or type conversion before '(' token
src/auto/XSTools/PaddedPackets/PaddedPackets.c:32: error: expected constructor, destructor, or type conversion before '(' token
src/auto/XSTools/PaddedPackets/PaddedPackets.xs:11: warning: 'lastTargetId' defined but not used
src/auto/XSTools/PaddedPackets/PaddedPackets.xs:12: warning: 'sitPacketID' defined but not used
src/auto/XSTools/PaddedPackets/PaddedPackets.xs:13: warning: 'skillPacketID' defined but not used
scons: *** [src/auto/XSTools/PaddedPackets/PaddedPackets.xs.os] Error 1
scons: building terminated because of errors.
-e \e[1;31mCompilation failed. Please read http://www.openkore.com/compilation.php for help.\e[0m
Can't locate loadable object for module XSTools in @INC (@INC contains: /Users/coquhome/ok/src/deps /Users/coquhome/ok/src /Users/coquhome/ok /Library/Perl/Updates/5.10.0 /System/Library/Perl/5.10.0/darwin-thread-multi-2level /System/Library/Perl/5.10.0 /Library/Perl/5.10.0/darwin-thread-multi-2level /Library/Perl/5.10.0 /Network/Library/Perl/5.10.0/darwin-thread-multi-2level /Network/Library/Perl/5.10.0 /Network/Library/Perl /System/Library/Perl/Extras/5.10.0/darwin-thread-multi-2level /System/Library/Perl/Extras/5.10.0 .) at ./openkore.pl line 25
lappy:ok coquhome$ 
I've scoured the Googles, but I've so far come up with nothing. I should probably mention I've not very savvy with this kinda stuff quite yet; much easier to run this on Windows. It's just be nice to be able to run this on either operating system. :<

Locked