From: Dr. Edmund Weitz
Subject: Problems with UncommonSQL on FreeBSD
Date: 
Message-ID: <m3aduypwx5.fsf@bird.agharta.de>
I managed to build UncommonSQL on my FreeBSD machine but I can't
connect to a database due to problems with the linker. Here's what I
did:

I started CMUCL and typed '(REQUIRE :UNCOMMONSQL)' which resulted in
loading of UncommonSQL. Afterwards, I loaded the following code from
the test file that comes with UncommonSQL:

  (defvar *database* nil)
  (defvar *database-name* "lisp")
  (defvar *database-user* "edi")
  
  (defun init-database ()
    (if (null *database*)
        (setq *database*
              (maisql-sys:connect
               `(nil ,*database-name*
                     ,*database-user*
                     nil) :database-type :postgresql))))
 
If I know try to evaluate (INIT-DATABASE), I get the following error:

  ;; Loading #p"/usr/local/lisp/binaries/uncommonsql/dbms/postgresql/postgresql-loader.x86f".
  ;;; Running library:load-foreign.csh...
  
  Error in function LOAD-FOREIGN:  library:load-foreign.csh failed:
  ld -N -R /usr/local/bin/lisp -Ttext E000000 -o /tmp/tmp95946A /usr/local/pgsql/lib/libpq.so.2 -lcrypt -lc
  /usr/lib/libcrypt.so.2: undefined reference to `warnx'
  /usr/lib/libcrypt.so.2: undefined reference to `dlerror'
  /usr/lib/libcrypt.so.2: undefined reference to `dlclose'
  /usr/lib/libcrypt.so.2: undefined reference to `dlopen'
  /usr/lib/libcrypt.so.2: undefined reference to `dlsym'
  if ( 1 != 0 ) exit 1
  exit 1
  
I get the same error messages with MySQL.

System information:

- FreeBSD 4.1
- CMUCL pre-18d
- load-foreign.csh taken from 18c 'cause it wasn't included with the
  pre-18d tarball
- PostgreSQL 7.0.2 from the FreeBSD ports collection (working fine
  otherwise) 
- file 'postgresql-loader.lisp' modified to reflect the correct
  position of libpq.so.2 on my machine

Any help is appreciated.

Thanks,
Edi.

PS: This question also sent to the CMUCL mailing list. I know that
there's also a mailing list for UncommonSQL but I suppose it is only
for announcements.

From: Wade Humeniuk
Subject: Re: Problems with UncommonSQL on FreeBSD
Date: 
Message-ID: <a33q8k$7ub$1@news3.cadvision.com>
I had the same problem last year, I also sent a post to the CMUCL mailing
group.  The basic answer is that CMUCL on FreeBSD does not support shared
object linking like its Linux cousin.

Wade

"Dr. Edmund Weitz" <···@agharta.de> wrote in message
···················@bird.agharta.de...
> I managed to build UncommonSQL on my FreeBSD machine but I can't
> connect to a database due to problems with the linker. Here's what I
> did:
>
> I started CMUCL and typed '(REQUIRE :UNCOMMONSQL)' which resulted in
> loading of UncommonSQL. Afterwards, I loaded the following code from
> the test file that comes with UncommonSQL:
>
>   (defvar *database* nil)
>   (defvar *database-name* "lisp")
>   (defvar *database-user* "edi")
>
>   (defun init-database ()
>     (if (null *database*)
>         (setq *database*
>               (maisql-sys:connect
>                `(nil ,*database-name*
>                      ,*database-user*
>                      nil) :database-type :postgresql))))
>
> If I know try to evaluate (INIT-DATABASE), I get the following error:
>
>   ;; Loading
#p"/usr/local/lisp/binaries/uncommonsql/dbms/postgresql/postgresql-loader.x8
6f".
>   ;;; Running library:load-foreign.csh...
>
>   Error in function LOAD-FOREIGN:  library:load-foreign.csh failed:
>   ld -N -R /usr/local/bin/lisp -Ttext E000000 -o /tmp/tmp95946A
/usr/local/pgsql/lib/libpq.so.2 -lcrypt -lc
>   /usr/lib/libcrypt.so.2: undefined reference to `warnx'
>   /usr/lib/libcrypt.so.2: undefined reference to `dlerror'
>   /usr/lib/libcrypt.so.2: undefined reference to `dlclose'
>   /usr/lib/libcrypt.so.2: undefined reference to `dlopen'
>   /usr/lib/libcrypt.so.2: undefined reference to `dlsym'
>   if ( 1 != 0 ) exit 1
>   exit 1
>
> I get the same error messages with MySQL.
>
> System information:
>
> - FreeBSD 4.1
> - CMUCL pre-18d
> - load-foreign.csh taken from 18c 'cause it wasn't included with the
>   pre-18d tarball
> - PostgreSQL 7.0.2 from the FreeBSD ports collection (working fine
>   otherwise)
> - file 'postgresql-loader.lisp' modified to reflect the correct
>   position of libpq.so.2 on my machine
>
> Any help is appreciated.
>
> Thanks,
> Edi.
>
> PS: This question also sent to the CMUCL mailing list. I know that
> there's also a mailing list for UncommonSQL but I suppose it is only
> for announcements.
From: Raymond Wiker
Subject: Re: Problems with UncommonSQL on FreeBSD
Date: 
Message-ID: <867kq2idko.fsf@raw.grenland.fast.no>
"Wade Humeniuk" <········@cadvision.com> writes:

> I had the same problem last year, I also sent a post to the CMUCL mailing
> group.  The basic answer is that CMUCL on FreeBSD does not support shared
> object linking like its Linux cousin.

        FreeBSD *does* support shared object linking. I suspect that
some modification to load-foreign.csh is in order.

        //Raymond.


-- 
Raymond Wiker                        Mail:  ·············@fast.no
Senior Software Engineer             Web:   http://www.fast.no/
Fast Search & Transfer ASA           Phone: +47 23 01 11 60
P.O. Box 1677 Vika                   Fax:   +47 35 54 87 99
NO-0120 Oslo, NORWAY                 Mob:   +47 48 01 11 60

Try FAST Search: http://alltheweb.com/
From: Johannes =?iso-8859-15?q?Gr=F8dem?=
Subject: Re: Problems with UncommonSQL on FreeBSD
Date: 
Message-ID: <lzy9iifiks.fsf@bzzzt.fix.no>
* "Wade Humeniuk" <········@cadvision.com>:

> I had the same problem last year, I also sent a post to the CMUCL mailing
> group.  The basic answer is that CMUCL on FreeBSD does not support shared
> object linking like its Linux cousin.

It worked on FreeBSD-4.3 with CMUCL 18c, but stopped working on
FreeBSD-4.4.

-- 
johs
From: Wade Humeniuk
Subject: Re: Problems with UncommonSQL on FreeBSD
Date: 
Message-ID: <a346ce$c3k$1@news3.cadvision.com>
"Johannes Gr�dem" <··@kopkillah.com> wrote in message
···················@bzzzt.fix.no...
> * "Wade Humeniuk" <········@cadvision.com>:
>
> > I had the same problem last year, I also sent a post to the CMUCL
mailing
> > group.  The basic answer is that CMUCL on FreeBSD does not support
shared
> > object linking like its Linux cousin.
>
> It worked on FreeBSD-4.3 with CMUCL 18c, but stopped working on
> FreeBSD-4.4.

Yes I was using it back when it was FreeBSD 4.1 to 4.2, before 18c.

Wade