From owner-freebsd-questions Fri Feb 26 6:47:38 1999 Delivered-To: freebsd-questions@freebsd.org Received: from lion.plab.ku.dk (lion.plab.ku.dk [130.225.105.49]) by hub.freebsd.org (Postfix) with ESMTP id A87EB14F43 for ; Fri, 26 Feb 1999 06:46:27 -0800 (PST) (envelope-from tobez@lion.plab.ku.dk) Received: (from tobez@localhost) by lion.plab.ku.dk (8.9.3/8.9.1) id PAA21123; Fri, 26 Feb 1999 15:46:30 +0100 (CET) To: Edwin de Graaf Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Linking a Perl module with aout libraries (FBSD31) References: <19990225160848.9640794E4@surf.iae.nl> From: Anton Berezin Date: 26 Feb 1999 15:46:30 +0100 In-Reply-To: Edwin de Graaf's message of Thu, 25 Feb 1999 17:09:07 +0100 (CET) Message-ID: <86d82xte7t.fsf@lion.plab.ku.dk> Lines: 55 X-Mailer: Gnus v5.3/Emacs 19.34 - on FreeBSD 4.0-current Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Edwin de Graaf writes: > I am trying to install the Perl DBD-odbc module on a FreeBSD > 3.1-STABLE server. To do this I need to link with the Solid ODBC > library which I only have in a.out format. Since the rest of the > system is ELF I am not sure how to accomplish this. > Will I need to compile Perl in a.out format? If so how do I do this? > I have tried setting OBJFORMAT to aout, and running a make in > src/gnu/usr.bin/perl, but that halts OK, _that_ was an interesting question! I managed to compile aout perl, but _not_ the default one shipped with FreeBSD. If you are interested in this, do the following: 1. Download ftp://ftp.funet.fi/pub/languages/perl/CPAN/authors/id/GBARR/perl5.005_03-MAINT_TRIAL_5.tar.gz In fact, any CPAN site will do. 2. Unpack it. 3. Download http://www.plab.ku.dk/tobez/FreeBSD-perl-aout/Makefile.SH and replace original Makefile.SH in the distribution. 4. Download http://www.plab.ku.dk/tobez/FreeBSD-perl-aout/hints/freebsd.sh and replace original hints/freebsd.sh in the distribution. 5. Cd to the distribution directory. 6. $ OBJFORMAT=aout sh Configure -DAOUT -des This will prepare to make _static_ libperl.a. You are welcome to try to build dynamically linked version yourself :-) though I think there is actually no need to do this to accomplish what you described. You may also wish to not run -des but rather run Configure in ``slow'' mode and change its defaults for installation paths. 7. $ OBJFORMAT=aout make 8. $ OBJFORMAT=aout make test All tests should be successful. At least they are on my 4.0-current machine. Also: $ file perl perl: FreeBSD/i386 compact demand paged dynamically linked executable not stripped $ file libperl.a libperl.a: current ar archive random library 9. Go root 10. OBJFORMAT=aout make install (UNTESTED) Hope this helps. -- Anton Berezin The Protein Laboratory, University of Copenhagen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message