Skip to content

libmcrypt fails to build on darwin #15482

Closed

Description

@mpscholten

Issue description

libmcrypt fails to build on OSX/Darwin. As libmcrypt is a dependency of php, you cannot install php on darwin via nix.

Steps to reproduce

Run nix-env -i libmcrypt on OSX:

...
308 warnings generated.
/nix/store/mzpf92w76ikc766mzl1k10qmmqbs6p9n-bash-4.3-p42/bin/bash ../libtool --tag=CC --mode=link clang  -g -O2   -o libmcrypt.la -rpath /nix/store/h261rh2jnz49vpm6fhm5xhap4q6aisvv-libmcrypt-2.5.8/lib -version-info 8:8:4 -version-info 8:8:4 -export-symbols libmcrypt.sym   mcrypt_extra.lo mcrypt.lo bzero.lo xmemory.lo mcrypt_modules.lo win32_comp.lo mcrypt_threads.lo mcrypt_symb.lo ../modules/modes/cbc.lo ../modules/modes/cfb.lo ../modules/modes/ctr.lo ../modules/modes/ecb.lo ../modules/modes/ncfb.lo ../modules/modes/nofb.lo ../modules/modes/ofb.lo ../modules/modes/stream.lo ../modules/algorithms/cast-128.lo ../modules/algorithms/gost.lo ../modules/algorithms/rijndael-128.lo ../modules/algorithms/twofish.lo ../modules/algorithms/arcfour.lo ../modules/algorithms/cast-256.lo ../modules/algorithms/loki97.lo ../modules/algorithms/rijndael-192.lo ../modules/algorithms/saferplus.lo ../modules/algorithms/wake.lo ../modules/algorithms/blowfish-compat.lo ../modules/algorithms/des.lo ../modules/algorithms/rijndael-256.lo ../modules/algorithms/serpent.lo ../modules/algorithms/xtea.lo ../modules/algorithms/blowfish.lo ../modules/algorithms/enigma.lo ../modules/algorithms/rc2.lo ../modules/algorithms/tripledes.lo
../libtool: line 96: gcc: command not found
../libtool: line 97: gcc: command not found
/nix/store/i8srxxkyq6rcwj2pjy8jiwg7055fzjpm-gnused-4.2.2/bin/sed: -e expression #1, char 0: no previous regular expression
/nix/store/i8srxxkyq6rcwj2pjy8jiwg7055fzjpm-gnused-4.2.2/bin/sed: -e expression #1, char 0: no previous regular expression
/nix/store/i8srxxkyq6rcwj2pjy8jiwg7055fzjpm-gnused-4.2.2/bin/sed: -e expression #1, char 0: no previous regular expression
/nix/store/i8srxxkyq6rcwj2pjy8jiwg7055fzjpm-gnused-4.2.2/bin/sed: -e expression #1, char 0: no previous regular expression
sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < libmcrypt.sym > .libs/libmcrypt-symbols.expsym
clang -dynamiclib ${wl}-undefined ${wl}dynamic_lookup -o .libs/libmcrypt.4.4.8.dylib  .libs/mcrypt_extra.o .libs/mcrypt.o .libs/bzero.o .libs/xmemory.o .libs/mcrypt_modules.o .libs/win32_comp.o .libs/mcrypt_threads.o .libs/mcrypt_symb.o ../modules/modes/.libs/cbc.o ../modules/modes/.libs/cfb.o ../modules/modes/.libs/ctr.o ../modules/modes/.libs/ecb.o ../modules/modes/.libs/ncfb.o ../modules/modes/.libs/nofb.o ../modules/modes/.libs/ofb.o ../modules/modes/.libs/stream.o ../modules/algorithms/.libs/cast-128.o ../modules/algorithms/.libs/gost.o ../modules/algorithms/.libs/rijndael-128.o ../modules/algorithms/.libs/twofish.o ../modules/algorithms/.libs/arcfour.o ../modules/algorithms/.libs/cast-256.o ../modules/algorithms/.libs/loki97.o ../modules/algorithms/.libs/rijndael-192.o ../modules/algorithms/.libs/saferplus.o ../modules/algorithms/.libs/wake.o ../modules/algorithms/.libs/blowfish-compat.o ../modules/algorithms/.libs/des.o ../modules/algorithms/.libs/rijndael-256.o ../modules/algorithms/.libs/serpent.o ../modules/algorithms/.libs/xtea.o ../modules/algorithms/.libs/blowfish.o ../modules/algorithms/.libs/enigma.o ../modules/algorithms/.libs/rc2.o ../modules/algorithms/.libs/tripledes.o   -install_name  /nix/store/h261rh2jnz49vpm6fhm5xhap4q6aisvv-libmcrypt-2.5.8/lib/libmcrypt.4.dylib -Wl,-compatibility_version -Wl,9 -Wl,-current_version -Wl,9.8
nmedit -s .libs/libmcrypt-symbols.expsym .libs/libmcrypt.4.4.8.dylib
../libtool: line 4530: nmedit: command not found
Makefile:301: recipe for target 'libmcrypt.la' failed
make[2]: *** [libmcrypt.la] Error 127
make[2]: Leaving directory '/private/var/folders/xx/xkk8v04907g8xt5k3kx3b2s40000gn/T/nix-build-libmcrypt-2.5.8.drv-0/libmcrypt-2.5.8/lib'
Makefile:290: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/private/var/folders/xx/xkk8v04907g8xt5k3kx3b2s40000gn/T/nix-build-libmcrypt-2.5.8.drv-0/libmcrypt-2.5.8'
Makefile:215: recipe for target 'all' failed
make: *** [all] Error 2
builder for ‘/nix/store/dw2pbkq7af5hdi8bcm9c29yj6cmnnnj1-libmcrypt-2.5.8.drv’ failed with exit code 2

The error seems to come from usage of nmedit ( ../libtool: line 4530: nmedit: command not found). Maybe the dependency to this binary needs to be declared somehow when building for darwin. Happy about any hints on how to fix this :)

Technical details

  • System: Latest OSX
  • Nix version: 1.10
  • Nixpkgs version: "16.09pre-git" / latest master

Activity

  1. domenkozar commented on May 26, 2016

    @domenkozar
    Member
  2. domenkozar commented on May 31, 2016

    @domenkozar
    Member

    Should be fixed now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions