Subject: pkg/36616: Erlang doesn't install compiled crypto library due to the bug in Makefile.in file.
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <nbsd@hck.sk>
List: pkgsrc-bugs
Date: 07/08/2007 13:15:00
>Number: 36616
>Category: pkg
>Synopsis: Erlang doesn't install compiled crypto library due to the bug in Makefile.in file.
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jul 08 13:15:00 +0000 2007
>Originator: Juraj Hercek
>Release: -current
>Organization:
>Environment:
NetBSD pkgsrc.hck.sk 4.99.22 NetBSD 4.99.22 (PKGSRC) #0: Sun Jul 1 19:09:33 CEST 2007 juraj@core:/netbsd/obj/sys/arch/i386/compile/PKGSRC i386
>Description:
Symptoms:
Failure to use use erlang's crypto engine:
---
$ erl
Erlang (BEAM) emulator version 5.5 [source]
Eshell V5.5 (abort with ^G)
1> crypto:start().
okexec:
crypto_drv: not found2>
=ERROR REPORT==== 7-Jul-2007::18:30:25 ===
** Generic server crypto_server terminating
** Last message in was {'EXIT',#Port<0.92>,normal}
** When Server state == {#Port<0.92>,[]}
** Reason for termination ==
** {port_died,normal}
exec: crypto_drv: not found
...
---
Package itself doesn't contain crypto_drv driver:
---
$ pkg_info -L erlang | grep crypto_drv.so
$
---
The source of the problem seems to be invalid erlang's lib/crypto/c_src/Makefile.in file. It uses INSTALL_PROGRAM on Makefile file which fails, because strip program doesn't know how to strip text file. The rest of the rules are ignored (the ones responsible for installing the crypto_drv.so file).
>How-To-Repeat:
After successful 'make' run 'make install' in pkgsrc/lang/erlang directory and carefully watch the output for failures during install.
>Fix:
Add following part into pkgsrc's lang/erlang/Makefile:
SUBST_CLASSES+= crypto
SUBST_STAGE.crypto= pre-configure
SUBST_MESSAGE.crypto= Fixing crypto driver makefile.
SUBST_FILES.crypto= lib/crypto/c_src/Makefile.in
SUBST_SED.crypto= -e 's|$$(INSTALL_PROGRAM) $$(DRV_MAKEFILE)|$$(INSTALL_DATA) $$(DRV_MAKEFILE)|'
and adjust PLIST file.