Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1063097 - Several newlisp modules are broken in F20
Summary: Several newlisp modules are broken in F20
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: newlisp
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nathan Owe
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-10 01:35 UTC by Sato Ichi
Modified: 2014-04-02 09:08 UTC (History)
2 users (show)

Fixed In Version: newlisp-10.5.4-3.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-04-02 09:08:22 UTC


Attachments (Terms of Use)

Description Sato Ichi 2014-02-10 01:35:57 UTC
Description of problem: The following newlisp modules do not load in F20 x86_64: crypto, gmp, gsl, mysql, postgres, sqlite3, unix, zlib. These all reside in the /usr/share/newlisp/modules directories, with a .lsp extension (e.g. crypto.lsp). When trying to load the modules in any newlisp program, an error occurs and the load fails.


Version-Release number of selected component (if applicable): newlisp-10.4.3-8.fc20.x86_64


How reproducible: Either run the interactive newlisp interpreter or create a newlisp script then try to load any of the above modules.


Steps to Reproduce:
1. Run newlisp.
2. Attempt to load the modules, like this:
(module "crypto.lsp")
(module "gmp.lsp")
(module "gsl.lsp")
(module "mysql.lsp")
(module "postgres.lsp")
(module "sqlite3.lsp")
(module "unix.lsp")
(module "zlib.lsp")


Actual results: The modules fail to load, producing these errors:
$ newlisp
newLISP v.10.4.3 64-bit on Linux IPv4/6 UTF-8, execute 'newlisp -h' for more info.

> (module "crypto.lsp")

ERR: user error : cannot find crypto library
called from user defined function module
> (module "gmp.lsp")

ERR: user error : cannot find GMP library
called from user defined function module
> (module "gsl.lsp")
This module needs newLISP compiled for extended ffi.
Must exit
$ newlisp
newLISP v.10.4.3 64-bit on Linux IPv4/6 UTF-8, execute 'newlisp -h' for more info.

> (module "mysql.lsp")

ERR: user error : cannot find libmysqlclient library
called from user defined function module
> (module "postgres.lsp")

ERR: user error : cannot find libpq library
called from user defined function module
> (module "sqlite3.lsp")

ERR: user error : cannot find sqlite3 library
called from user defined function module
> (module "unix.lsp")

ERR: problem loading library in function import : "/lib/libc.so.6: wrong ELF class: ELFCLASS32"
called from user defined function module
> (module "zlib.lsp")

ERR: user error : cannot find zlib compression library
called from user defined function module


Expected results: The modules should load without error, e.g. like this:
> (module "crypto.lsp")
(lambda (crypto:str crypto:raw-flag)
 (if crypto:raw-flag
  (let (crypto:buff (dup "\000" 20))
   (cpymem (crypto:RIPEMD160 crypto:str (length crypto:str) 0) crypto:buff 20) crypto:buff)
  (join (map (lambda (crypto:x) (format "%02x" (& crypto:x 255))) (unpack (dup "c"
      20)
     (crypto:RIPEMD160 crypto:str (length crypto:str) 0))))))



Additional info: The reason that the modules fail to load is that in the corresponding *.lsp module files the necessary libraries are not being found in F20 x86_64. For example, in the /usr/share/newlisp/modules/crypto.lsp file the following code (starting at line 41) does not list the 64-bit version of libcrypto.so:

(set 'files '(
    "C:/Program Files/gnuwin32/bin/libeay32.dll" ; XP
    "C:/Program Files (x86)/gnuwin32/bin/libeay32.dll" ; 7
    "/usr/lib/libcrypto.so"
    "/usr/lib/libcrypto.so.0.9.8"
    "/usr/lib/libcrypto.so.0.9.7"
    "/usr/lib/libcrypto.so.0.9.6"
    "/usr/lib/libcrypto.so.4"
    "/usr/lib/libcrypto.so.18.0" ; OpenBSD 4.6
    "/usr/lib/libcrypto.dylib"
))

I was able to fix this by adding this line below line 43:
    "/usr/lib64/libcrypto.so"
This requires the openssl-devel package to be installed.

I was able to fix the other modules like this:

In /usr/share/newlisp/modules/gmp.lsp insert after line 146:
    "/usr/lib64/libgmp.so" ; Linux, BSDs
    "/usr/lib/libgmp.so" ; Linux, BSDs
This requires gmp-devel.

In /usr/share/newlisp/modules/gsl.lsp insert after line 171:
		(= ostype "Linux") "/usr/lib64/libgsl.so" ; 64-bit
		(= ostype "Linux") "/usr/lib/libgsl.so" ; 32-bit
This requires gsl-devel. Still needs to be recompiled with ffi support, which I haven't tried.

In /usr/share/newlisp/modules/mysql.lsp insert after line 96:
	"/usr/lib64/mysql/libmysqlclient.so" ; Linux Fedora
This requires mariadb-devel.

In /usr/share/newlisp/modules/postgres.lsp insert after line 96:
	"/usr/lib64/libpq.so" ; Fedora 64-bit
	"/usr/lib/libpq.so" ; Fedora 32-bit
This requires postgresql-devel.

In /usr/share/newlisp/modules/sqlite3.lsp insert after line 83:
	"/usr/lib64/libsqlite3.so" ; Fedora Linux 64-bit
This requires sqlite-devel.

In /usr/share/newlisp/modules/unix.lsp insert after line 42:
	"/lib64/libc.so.6" ; Fedora Linux 64-bit

In /usr/share/newlisp/modules/zlib.lsp insert after line 29:
	"/usr/lib64/libz.so" ; Linux, BSD, Solaris
This requires zlib-devel.

Comment 1 Fedora Update System 2014-03-30 23:27:14 UTC
newlisp-10.5.4-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/newlisp-10.5.4-1.fc20

Comment 2 Nathan Owe 2014-03-30 23:39:35 UTC
Seems new version doesn't fix this either. I will have to play with this and see if I can find out why it is happening.

Comment 3 Nathan Owe 2014-03-31 00:07:35 UTC
Another update, I am working with create a patch so that what information you provided, by the way, thanks.

Comment 4 Fedora Update System 2014-03-31 23:32:27 UTC
newlisp-10.5.4-2.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/newlisp-10.5.4-2.fc20

Comment 5 Fedora Update System 2014-04-01 00:59:34 UTC
newlisp-10.5.4-3.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/newlisp-10.5.4-3.fc20

Comment 6 lnie 2014-04-01 03:05:27 UTC
newlisp-10.5.4-3.fc20 works

Comment 7 Nathan Owe 2014-04-01 14:03:04 UTC
(In reply to Sato Ichi from comment #0)
> Description of problem: The following newlisp modules do not load in F20
> x86_64: crypto, gmp, gsl, mysql, postgres, sqlite3, unix, zlib. These all
> reside in the /usr/share/newlisp/modules directories, with a .lsp extension
> (e.g. crypto.lsp). When trying to load the modules in any newlisp program,
> an error occurs and the load fails.
> 
> 
> Version-Release number of selected component (if applicable):
> newlisp-10.4.3-8.fc20.x86_64
> 
> 
> How reproducible: Either run the interactive newlisp interpreter or create a
> newlisp script then try to load any of the above modules.
> 
> 
> Steps to Reproduce:
> 1. Run newlisp.
> 2. Attempt to load the modules, like this:
> (module "crypto.lsp")
> (module "gmp.lsp")
> (module "gsl.lsp")
> (module "mysql.lsp")
> (module "postgres.lsp")
> (module "sqlite3.lsp")
> (module "unix.lsp")
> (module "zlib.lsp")
> 
> 
> Actual results: The modules fail to load, producing these errors:
> $ newlisp
> newLISP v.10.4.3 64-bit on Linux IPv4/6 UTF-8, execute 'newlisp -h' for more
> info.
> 
> > (module "crypto.lsp")
> 
> ERR: user error : cannot find crypto library
> called from user defined function module
> > (module "gmp.lsp")
> 
> ERR: user error : cannot find GMP library
> called from user defined function module
> > (module "gsl.lsp")
> This module needs newLISP compiled for extended ffi.
> Must exit
> $ newlisp
> newLISP v.10.4.3 64-bit on Linux IPv4/6 UTF-8, execute 'newlisp -h' for more
> info.
> 
> > (module "mysql.lsp")
> 
> ERR: user error : cannot find libmysqlclient library
> called from user defined function module
> > (module "postgres.lsp")
> 
> ERR: user error : cannot find libpq library
> called from user defined function module
> > (module "sqlite3.lsp")
> 
> ERR: user error : cannot find sqlite3 library
> called from user defined function module
> > (module "unix.lsp")
> 
> ERR: problem loading library in function import : "/lib/libc.so.6: wrong ELF
> class: ELFCLASS32"
> called from user defined function module
> > (module "zlib.lsp")
> 
> ERR: user error : cannot find zlib compression library
> called from user defined function module
> 
> 
> Expected results: The modules should load without error, e.g. like this:
> > (module "crypto.lsp")
> (lambda (crypto:str crypto:raw-flag)
>  (if crypto:raw-flag
>   (let (crypto:buff (dup "\000" 20))
>    (cpymem (crypto:RIPEMD160 crypto:str (length crypto:str) 0) crypto:buff
> 20) crypto:buff)
>   (join (map (lambda (crypto:x) (format "%02x" (& crypto:x 255))) (unpack
> (dup "c"
>       20)
>      (crypto:RIPEMD160 crypto:str (length crypto:str) 0))))))
> 
> 
> 
> Additional info: The reason that the modules fail to load is that in the
> corresponding *.lsp module files the necessary libraries are not being found
> in F20 x86_64. For example, in the /usr/share/newlisp/modules/crypto.lsp
> file the following code (starting at line 41) does not list the 64-bit
> version of libcrypto.so:
> 
> (set 'files '(
>     "C:/Program Files/gnuwin32/bin/libeay32.dll" ; XP
>     "C:/Program Files (x86)/gnuwin32/bin/libeay32.dll" ; 7
>     "/usr/lib/libcrypto.so"
>     "/usr/lib/libcrypto.so.0.9.8"
>     "/usr/lib/libcrypto.so.0.9.7"
>     "/usr/lib/libcrypto.so.0.9.6"
>     "/usr/lib/libcrypto.so.4"
>     "/usr/lib/libcrypto.so.18.0" ; OpenBSD 4.6
>     "/usr/lib/libcrypto.dylib"
> ))
> 
> I was able to fix this by adding this line below line 43:
>     "/usr/lib64/libcrypto.so"
> This requires the openssl-devel package to be installed.
> 
> I was able to fix the other modules like this:
> 
> In /usr/share/newlisp/modules/gmp.lsp insert after line 146:
>     "/usr/lib64/libgmp.so" ; Linux, BSDs
>     "/usr/lib/libgmp.so" ; Linux, BSDs
> This requires gmp-devel.
> 
> In /usr/share/newlisp/modules/gsl.lsp insert after line 171:
> 		(= ostype "Linux") "/usr/lib64/libgsl.so" ; 64-bit
> 		(= ostype "Linux") "/usr/lib/libgsl.so" ; 32-bit
> This requires gsl-devel. Still needs to be recompiled with ffi support,
> which I haven't tried.
> 
> In /usr/share/newlisp/modules/mysql.lsp insert after line 96:
> 	"/usr/lib64/mysql/libmysqlclient.so" ; Linux Fedora
> This requires mariadb-devel.
> 
> In /usr/share/newlisp/modules/postgres.lsp insert after line 96:
> 	"/usr/lib64/libpq.so" ; Fedora 64-bit
> 	"/usr/lib/libpq.so" ; Fedora 32-bit
> This requires postgresql-devel.
> 
> In /usr/share/newlisp/modules/sqlite3.lsp insert after line 83:
> 	"/usr/lib64/libsqlite3.so" ; Fedora Linux 64-bit
> This requires sqlite-devel.
> 
> In /usr/share/newlisp/modules/unix.lsp insert after line 42:
> 	"/lib64/libc.so.6" ; Fedora Linux 64-bit
> 
> In /usr/share/newlisp/modules/zlib.lsp insert after line 29:
> 	"/usr/lib64/libz.so" ; Linux, BSD, Solaris
> This requires zlib-devel.


Thank you for finding out how to fix the issues of the modules. I have also sent the patch upstream, hoping it will be fixed there for future releases.

Comment 8 Fedora Update System 2014-04-02 09:08:22 UTC
newlisp-10.5.4-3.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.