From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10364 Path: news.gmane.org!.POSTED!not-for-mail From: Assaf Gordon Newsgroups: gmane.linux.lib.musl.general Subject: ./configure errors witn musl-gcc (zlib library conflict when building openssh) Date: Fri, 5 Aug 2016 18:32:14 -0400 Message-ID: <66c1b284-a9ae-774f-579f-fac0d1c6193e@gmail.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1470436368 6930 195.159.176.226 (5 Aug 2016 22:32:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 5 Aug 2016 22:32:48 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 To: musl@lists.openwall.com Original-X-From: musl-return-10377-gllmg-musl=m.gmane.org@lists.openwall.com Sat Aug 06 00:32:44 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1bVnfS-0000Ji-EN for gllmg-musl@m.gmane.org; Sat, 06 Aug 2016 00:32:38 +0200 Original-Received: (qmail 15609 invoked by uid 550); 5 Aug 2016 22:32:35 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 15556 invoked from network); 5 Aug 2016 22:32:28 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:subject:to:message-id:date:user-agent:mime-version :content-transfer-encoding; bh=ilzvtGMNJtElPHz0DNpb+GhzNWHo6W4ofKvC17MZMHc=; b=ZRxv5W+TUeEvuKvECNQGTFx8vm1pSr4v5Vf6j9e6gC70K7DGBM80kpXuZGC9kdp+sr 9+FIvq1QuKf56Kp7L6oW+qYCXd63tYaD/71YqoN3zwpoTRSNlEbLAITY62etIY8FvLiD bnLfyQXEesiIVoU15HYkY88+BNRsezCRPUm6AQJfJNAfh0NMiLsoMYslULY+m9oy0efr FvYATBKv8oGmopmZTW0QyUOdlEI7rqOU7YOIWYds/j1xvArxuX3jrZ0R9FHmjS4Jptuj 4Uv60irFpNWSWR/Q3AJbId94BHVYmypPRVOfi5WvkDYvHXoVQFSeIKciOyGxvqRwX9FJ 36wQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:subject:to:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=ilzvtGMNJtElPHz0DNpb+GhzNWHo6W4ofKvC17MZMHc=; b=WfUt8u6ys0UrmBsDJ0VBFphGpIPkg7KiLYMDd77ZKCWIE0C+tBv7xnyVHm/G6m6bhS HCnOoLLWLbmo/Ipebcf+ciLO6gUmNv+sBiybckj6HORy92XMsnkZtUkw3I255m89EpjN kl4Xao02BNNpitFbOVGycmexLogsLjGBucqf22PXSPZRF81X9wyAJD3yolpXYv13fupk /NDrLY50cUlsdLQGHceAxZSvj88vq0G8H5saJqCbtNKezQHgE93CdbrWOTujolK2EDKP imZdbiUl3gYazvxq0ICBFb51VYOY34xtkFJE2SgoS9/P68QDk+puLG0MVMKnUkBv1BF1 n+Ow== X-Gm-Message-State: AEkoouu8r+7f8i0qHJ1FG1XhPHUHYgJKhcQiRjQBNJi6zWdNmj3PvVNXuWhbkN97gqDnwg== X-Received: by 10.200.50.167 with SMTP id z36mr15693172qta.6.1470436335659; Fri, 05 Aug 2016 15:32:15 -0700 (PDT) Xref: news.gmane.org gmane.linux.lib.musl.general:10364 Archived-At: Hello, I'm trying to build openssh on Ubuntu with musl-gcc, and encountered a problem during "./configure" due to required library (zlib) which causes conflicts between the system's glibc and musl-libc. There is probably a simple solution, but I couldn't find one. The system is Ubuntu 14.04 LTS, gcc 4.8.4. musl is 1.1.15 built from source, installed to /usr/local/musl . First, I build zlib using musl-gcc: wget http://zlib.net/zlib-1.2.8.tar.gz tar -xf zlib-1.2.8.tar.gz cd zlib-1.2.8 CC=musl-gcc ./configure make This works well (note I did not install it with 'sudo make install'). Second, I try to build openssh: git clone https://github.com/openssh/openssh-portable cd openssh-portable autoreconf -if CC=musl-gcc ./configure --without-stackprotect --with-zlib=/home/ubuntu/sources/zlib-1.2.8 But this fails with: checking zlib.h usability... yes checking zlib.h presence... yes checking for zlib.h... yes checking for deflate in -lz... yes checking for possibly buggy zlib... yes configure: error: *** zlib too old - check config.log *** Your reported zlib version has known security problems. It's possible your vendor has fixed these problems without changing the version number. If you are sure this is the case, you can disable the check by running "./configure --without-zlib-version-check". If you are in doubt, upgrade zlib to version 1.2.3 or greater. See http://www.gzip.org/zlib/ for details. The problem is not that zlib is "too old", but that the wrong shard-object is used (it uses the system's one). From config.log: configure:9002: checking for possibly buggy zlib configure:9041: musl-gcc -o conftest -g -O2 -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security -Wsizeof-pointer-memaccess -Wno-pointer-sign -Wno-unused-result -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -ftrapv -fno-builtin-memset -I/home/ubuntu/sources/zlib-1.2.8 -L/home/ubuntu/sources/zlib-1.2.8 -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack conftest.c -lz >&5 configure:9041: $? = 0 configure:9041: ./conftest Error relocating /lib/x86_64-linux-gnu/libz.so.1: __snprintf_chk: symbol not found Error relocating /lib/x86_64-linux-gnu/libz.so.1: __vsnprintf_chk: symbol not found configure:9041: $? = 127 configure: program exited with status 127 If I try to force LD_LIBRARY_PATH, this messes up the entire compilation: $ export LD_LIBRARY_PATH="/home/ubuntu/sources/zlib-1.2.8:$LD_LIBRARY_PATH" $ CC=musl-gcc ./configure --without-stackprotect --with-zlib=/home/ubuntu/sources/zlib-1.2.8 checking for gcc... musl-gcc checking whether the C compiler works... no configure: error: in `/home/ubuntu/openssh-portable': configure: error: C compiler cannot create executables See `config.log' for more details From 'config.log': configure:2963: checking whether the C compiler works configure:2985: musl-gcc conftest.c >&5 /usr/lib/gcc/x86_64-linux-gnu/4.8/cc1: error while loading shared libraries: /usr/lib/x86_64-linux-gnu/libc.so: invalid ELF header configure:2989: $? = 1 configure:3027: result: no As an alternative I also tried installing zlib in /usr/local/musl/lib - but it gives the same kind of erros once LD_LIBRARY_PATH is modified. Any suggestions are very welcomed, thanks, - assaf