Subject: pkg/36616: Erlang doesn't install compiled crypto library due to the bug in file.
To: None <,,>
From: None <>
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 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
NetBSD 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

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(). 
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

The source of the problem seems to be invalid erlang's lib/crypto/c_src/ 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 file).
After successful 'make' run 'make install' in pkgsrc/lang/erlang directory and carefully watch the output for failures during install.
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/

and adjust PLIST file.