Closed LeeBergstrand closed 8 years ago
@LeeBergstrand can you brew install zlib
and try again? It may be missing a dependency on Linux.
After brew install zlib
new errors occur:
brew install pigz
==> Downloading http://www.zlib.net/pigz/pigz-2.3.3.tar.gz
Already downloaded: /home/leebergstrand/.cache/Homebrew/pigz-2.3.3.tar.gz
==> make CC=/usr/bin/gcc-4.8 CFLAGS=-Os -w -pipe -march=core2
Last 15 lines from /home/leebergstrand/.cache/Homebrew/Logs/pigz/01.make:
/usr/bin/gcc-4.8 -Os -w -pipe -march=core2 -isystem/home/leebergstrand/.linuxbrew/include -c -o yarn.o yarn.c
/usr/bin/gcc-4.8 -Os -w -pipe -march=core2 -isystem/home/leebergstrand/.linuxbrew/include -c -o try.o try.c
/usr/bin/gcc-4.8 -Os -w -pipe -march=core2 -isystem/home/leebergstrand/.linuxbrew/include -c -o zopfli/src/zopfli/deflate.o z
opfli/src/zopfli/deflate.c
/usr/bin/gcc-4.8 -Os -w -pipe -march=core2 -isystem/home/leebergstrand/.linuxbrew/include -c -o zopfli/src/zopfli/blocksplitt
er.o zopfli/src/zopfli/blocksplitter.c
/usr/bin/gcc-4.8 -Os -w -pipe -march=core2 -isystem/home/leebergstrand/.linuxbrew/include -c -o zopfli/src/zopfli/tree.o zopf
li/src/zopfli/tree.c
/usr/bin/gcc-4.8 -Os -w -pipe -march=core2 -isystem/home/leebergstrand/.linuxbrew/include -c -o zopfli/src/zopfli/lz77.o zopf
li/src/zopfli/lz77.c
/usr/bin/gcc-4.8 -Os -w -pipe -march=core2 -isystem/home/leebergstrand/.linuxbrew/include -c -o zopfli/src/zopfli/cache.o zop
fli/src/zopfli/cache.c
/usr/bin/gcc-4.8 -Os -w -pipe -march=core2 -isystem/home/leebergstrand/.linuxbrew/include -c -o zopfli/src/zopfli/hash.o zopf
li/src/zopfli/hash.c
/usr/bin/gcc-4.8 -Os -w -pipe -march=core2 -isystem/home/leebergstrand/.linuxbrew/include -c -o zopfli/src/zopfli/util.o zopf
li/src/zopfli/util.c
/usr/bin/gcc-4.8 -Os -w -pipe -march=core2 -isystem/home/leebergstrand/.linuxbrew/include -c -o zopfli/src/zopfli/squeeze.o z
opfli/src/zopfli/squeeze.c
/usr/bin/gcc-4.8 -Os -w -pipe -march=core2 -isystem/home/leebergstrand/.linuxbrew/include -c -o zopfli/src/zopfli/katajainen.
o zopfli/src/zopfli/katajainen.c
/usr/bin/gcc-4.8 -lz -o pigz pigz.o yarn.o try.o zopfli/src/zopfli/deflate.o zopfli/src/zopfli/blocksplitter.o zopfli/src/zopf
li/tree.o zopfli/src/zopfli/lz77.o zopfli/src/zopfli/cache.o zopfli/src/zopfli/hash.o zopfli/src/zopfli/util.o zopfli/src/zopf
li/squeeze.o zopfli/src/zopfli/katajainen.o -lpthread -lm
/usr/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status
make: *** [pigz] Error 1
BREW LOG:
After sudo apt-get install --reinstall zlibc zlib1g zlib1g-dev
new errors occur:
brew install pigz
==> Downloading http://www.zlib.net/pigz/pigz-2.3.3.tar.gz
Already downloaded: /home/leebergstrand/.cache/Homebrew/pigz-2.3.3.tar.gz
==> make CC=/usr/bin/gcc-4.8 CFLAGS=-Os -w -pipe -march=core2
Last 15 lines from /home/leebergstrand/.cache/Homebrew/Logs/pigz/01.make:
pigz.c:(.text+0x6fa1): undefined reference to `adler32'
pigz.c:(.text+0x6fa8): undefined reference to `crc32'
pigz.c:(.text+0x6fdc): undefined reference to `deflate'
pigz.c:(.text+0x703d): undefined reference to `deflatePending'
pigz.c:(.text+0x706d): undefined reference to `deflate'
pigz.c:(.text+0x70e1): undefined reference to `deflatePrime'
pigz.c:(.text+0x711b): undefined reference to `deflatePending'
pigz.c:(.text+0x7147): undefined reference to `deflate'
pigz.c:(.text+0x71bf): undefined reference to `deflate'
pigz.c:(.text+0x7431): undefined reference to `adler32'
pigz.c:(.text+0x7438): undefined reference to `crc32'
pigz.c:(.text+0x7470): undefined reference to `adler32'
pigz.c:(.text+0x7477): undefined reference to `crc32'
collect2: error: ld returned 1 exit status
make: *** [pigz] Error 1
BREW LOGS:
@tseemann Looks like its having trouble finding zlib even after brew
and apt-get
installing lib.
I wasn't able to reproduce this issue on my box that uses Linuxbrew's gcc
, but I was able to reproduce the issue on Travis CI. https://travis-ci.org/Linuxbrew/linuxbrew/builds/104567948
This link line is broken:
https://travis-ci.org/Linuxbrew/linuxbrew/builds/104567948#L352
/usr/bin/gcc-4.6 -lz -o pigz pigz.o yarn.o try.o zopfli/src/zopfli/deflate.o zopfli/src/zopfli/blocksplitter.o zopfli/src/zopfli/tree.o zopfli/src/zopfli/lz77.o zopfli/src/zopfli/cache.o zopfli/src/zopfli/hash.o zopfli/src/zopfli/util.o zopfli/src/zopfli/squeeze.o zopfli/src/zopfli/katajainen.o -lpthread -lm
-lz
should come at the end of the line, and the -L
option is missing, which means that the Makefile is ignoring LDFLAGS
. Please report these issues to the upstream author. If you patch the Makefile and submit a PR to the upstream author, we can include that patch in Linuxbrew until the next release of pigz
that includes the patch.
In the mean time I've added zlib
as a dependency of pigz
in #747.
I forgot to mention a workaround is to install Homebrew's gcc (assuming that you're currently using the system-provided compiler):
brew install gcc pigz
BREW LOG:
https://gist.github.com/anonymous/ab688fb35a393524ebc2