Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make docker-compose fails with "cannot find -lz" #131

Open
brunograsselli opened this issue Feb 18, 2017 · 3 comments · May be fixed by #143
Open

make docker-compose fails with "cannot find -lz" #131

brunograsselli opened this issue Feb 18, 2017 · 3 comments · May be fixed by #143

Comments

@brunograsselli
Copy link

Hi, I am trying to run bottled water with docker.

When I execute make docker-compose I get the following error:

make -C kafka all
make[1]: Entering directory '/root/bottledwater/kafka'
gcc bottledwater.c -c -std=c99 -D_POSIX_C_SOURCE=200809L -I../client -I../ext -I/usr/include/postgresql -I/usr/include/postgresql/9.5/server  -I/usr/local/include  -DAVRO_1_8   -Wall -Wmissing-prototypes -Wpointer-arith -Wendif-labels -Wmissing-format-attribute -Wformat-security -o bottledwater.o
gcc json.c -c -std=c99 -D_POSIX_C_SOURCE=200809L -I../client -I../ext -I/usr/include/postgresql -I/usr/include/postgresql/9.5/server  -I/usr/local/include  -DAVRO_1_8   -Wall -Wmissing-prototypes -Wpointer-arith -Wendif-labels -Wmissing-format-attribute -Wformat-security -o json.o
gcc registry.c -c -std=c99 -D_POSIX_C_SOURCE=200809L -I../client -I../ext -I/usr/include/postgresql -I/usr/include/postgresql/9.5/server  -I/usr/local/include  -DAVRO_1_8   -Wall -Wmissing-prototypes -Wpointer-arith -Wendif-labels -Wmissing-format-attribute -Wformat-security -o registry.o
gcc table_mapper.c -c -std=c99 -D_POSIX_C_SOURCE=200809L -I../client -I../ext -I/usr/include/postgresql -I/usr/include/postgresql/9.5/server  -I/usr/local/include  -DAVRO_1_8   -Wall -Wmissing-prototypes -Wpointer-arith -Wendif-labels -Wmissing-format-attribute -Wformat-security -o table_mapper.o
gcc logger.c -c -std=c99 -D_POSIX_C_SOURCE=200809L -I../client -I../ext -I/usr/include/postgresql -I/usr/include/postgresql/9.5/server  -I/usr/local/include  -DAVRO_1_8   -Wall -Wmissing-prototypes -Wpointer-arith -Wendif-labels -Wmissing-format-attribute -Wformat-security -o logger.o
gcc bottledwater.o json.o registry.o table_mapper.o logger.o ../client/libbottledwater.a -o bottledwater -L/usr/lib/x86_64-linux-gnu -lpq -lrdkafka -lz -lpthread  -L/usr/local/lib -lavro  -L/usr/lib/x86_64-linux-gnu -lcurl -ljansson
/usr/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status
Makefile:29: recipe for target 'bottledwater' failed
make[1]: *** [bottledwater] Error 1
make[1]: Leaving directory '/root/bottledwater/kafka'
make: *** [all] Error 2
Makefile:6: recipe for target 'all' failed
The command '/bin/sh -c cd /root/bottledwater &&     make clean && make && make install && cd / &&     tar czf bottledwater-ext.tar.gz usr/lib/postgresql/${PG_MAJOR}/lib/bottledwater.so usr/share/postgresql/${PG_MAJOR}/extension/bottledwater* &&     cp /root/bottledwater/kafka/bottledwater /root/bottledwater/client/bwtest /usr/local/bin &&     tar czf bottledwater-bin.tar.gz usr/local/bin/bottledwater usr/local/bin/bwtest' returned a non-zero code: 2
make: *** [docker-build] Error 2

Some information about my environment:

$ docker version
Client:
 Version:      1.13.1
 API version:  1.26
 Go version:   go1.7.5
 Git commit:   092cba3
 Built:        Wed Feb  8 08:47:51 2017
 OS/Arch:      darwin/amd64

Server:
 Version:      1.13.1
 API version:  1.26 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   092cba3
 Built:        Wed Feb  8 08:47:51 2017
 OS/Arch:      linux/amd64
 Experimental: true
$ docker-compose version
docker-compose version 1.11.1, build 7c5d5e4
docker-py version: 2.0.2
CPython version: 2.7.12
OpenSSL version: OpenSSL 1.0.2j  26 Sep 2016
$ git log -1
commit e9a53794435f0e6941d7d3646a09942341c0cd9d
Merge: 7d1f9d3 cc5190e
Author: Sam Stokes <[email protected]>
Date:   Wed Sep 7 14:43:32 2016 -0700

    Merge pull request #114 from buzila/master

    Represent NUMERIC as "double" rather than zero #4

Is it a known issue? Anything I might be doing wrong?

Thanks!

@dudleycarr
Copy link

dudleycarr commented Mar 5, 2017

I ran into the same issue. Worked around the issue by adding zlib1g-dev into the set of package installed by apt-get in build/Dockerfile.build and build/Dockerfile.build94

@brunograsselli
Copy link
Author

Thanks @dudleycarr , it works!

@wswuai
Copy link

wswuai commented Jul 11, 2017

same issue.

same fix like @dudleycarr 👍

/build/Dockerfile.build

  • 56: RUN apt-get install zlib1g-dev

ajhyndman added a commit to ajhyndman/bottledwater-pg that referenced this issue Jul 27, 2017
ajhyndman added a commit to ajhyndman/bottledwater-pg that referenced this issue Jul 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants