-----BEGIN PGP SIGNED MESSAGE-----

Moin,

On Saturday 28 February 2004 19:15, Nick Ing-Simmons wrote:
> Tels <[EMAIL PROTECTED]> writes:
> >-----BEGIN PGP SIGNED MESSAGE-----
> >
> >null:/home/te/perl/Irrlicht/Games-Irrlicht-0.01 # whereis libXxf86vm
> >libXxf86vm:
> >null:/home/te/perl/Irrlicht/Games-Irrlicht-0.01 # whereis libjpeg
> >libjpeg: /usr/lib/libjpeg.a /usr/lib/libjpeg.la /usr/lib/libjpeg.so
> >
> >The libraries are there and /usr/X11R6/lib is a symlink to /usr/X11/lib:
>
> And GCC et. al. don't look in there by default.
> You need a -L
> Tk has:
>
> #     LIBS => [q[-L/usr/X11R6/lib -lX11 -lnsl -lm]]
>
> After its Makefile.PL has done some poking about.

Toni Schindl already gave me this tip, but there is one more trick involved:

     LIBS => ['-L"/usr/X11R6/lib" -lX11 -lnsl -lm'],

does _not_ work, The '"' make it fail. This works:

     LIBS => ['-L/usr/X11R6/lib -lX11 -lnsl -lm'],

(For whatever reasons, there is no good documentation in MakeMaker.pm
detailing what goes into LIBS and why).

However, attached are two files: my Makefile.PL and a batch file to compile
the module manually. The batch file works, the Makefile.PL not. I have no
idea why not. The .so file generated by the Makefile.PL version is 2 K
shorter and misses the references to the X libs (and thus fails to load).
The one by the batch file is fine. I now hacked my testsuite first to
compile the .so file via the shell script - which is unportable but at
least lets me test it locally.

Any insight would be greatly appreciated!

Cheers,

Tels


- --
 Signed on Sat Feb 28 19:20:29 2004 with key 0x93B84C15.
 Visit my photo gallery at http://bloodgate.com/photos/
 PGP key on http://bloodgate.com/tels.asc or per email.

 "Retsina?" - "Ja, Papa?" - "Warp 3." - "Is gut, Papa."



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)
Comment: When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.

iQEVAwUBQEDiT3cLPEOTuEwVAQEk9gf8DgEQtQ8jdaTbwr0WsKnnuq4zqBRd8F4w
FyLXWcE7pkdmXkkrrzwJ8dnBuPsydm0TLt/Dcp4rV4aNKZY0h2TG3ZRR3EbByTGo
MSJOjOTDah0d5j+ICK6JyG2bzpGXhXSXeVYRSDgWJaoRdNdyCMXnXHFc59B0Budo
CNaDqBqYs8BMbn2yLn/kQ7L4/5CRW/oQCup0hmFjyUntiKLLSa4DkWEmln4NlWhF
m8DsTot4eVo+HhZTqPav2s2L1HpzdB0A5ECx9kwfSMRxdb+cBZiEGQWgYMv3yjo0
vJ7X30SK23CHrTK8erFv/eongtZNG5vZN3Ov4T1QXzAm3/cwLEcfyw==
=J/xF
-----END PGP SIGNATURE-----
# home grown "makefile" to compile the .so file properly, MakeMaker does not
# like me this week...

/home/usr/local/bin/perl /usr/local/lib/perl5/5.8.2/ExtUtils/xsubpp  -C++ -typemap 
/usr/local/lib/perl5/5.8.2/ExtUtils/typemap  Irrlicht.xs > Irrlicht.xsc && mv 
Irrlicht.xsc Irrlicht.c

g++ Irrlicht.c -shared -fno-strict-aliasing -o 
blib/arch/auto/Games/Irrlicht/Irrlicht.so -I/usr/local/include 
"-I/usr/local/lib/perl5/5.8.2/i686-linux/CORE" -L"/usr/X11R6/lib" 
-L"/usr/local/lib/Irrlicht" -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -ljpeg -lz



use ExtUtils::MakeMaker;

# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.

WriteMakefile(
	'NAME'		=> 'Games::Irrlicht',
	'VERSION_FROM'	=> 'lib/Games/Irrlicht.pm',
	'PREREQ_PM'	=> {
			 Config::Simple => '4.55',
			},
	($] >= 5.005 ?
		(ABSTRACT_FROM  => 'lib/Games/Irrlicht.pm',
                AUTHOR         => 'Tels <http://bloodgate.com/>') : ()),
	'CC'		=> 'g++',
	'LD'		=> 'g++',
	'LIBS'		=> [ '-L/usr/X11R6/lib -L/usr/local/lib/Irrlicht -lX11 -lXext -lXxf86vm -lIrrlicht -lGL -ljpeg -lz' ],

# makes no difference
#	'LDFLAGS'	=> '-static -L/usr/X11R6/lib -L/usr/local/lib/Irrlicht -lIrrlicht -lXxf86vm -lGL -lGLU -lX11 -lXext -ljpeg -lz',

	'OPTIMIZE'	=> '-O2',
	'DEFINE'	=> '', # e.g., '-DHAVE_SOMETHING'
	'INC'		=> '',
# makes no difference
#	'XSOPT'		=> '-C++', 
#	'OBJECT'	=> '', 
);

Reply via email to