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

Fix /usr/bin/ld --with-ld-opt="-static" not found #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

crestone
Copy link
Contributor

@crestone crestone commented Aug 7, 2016

Fix error with /usr/bin/ld

checking for OS
+ Linux 3.10.0-327.el7.x86_64 x86_64
checking for C compiler ... found
+ using GNU C compiler
+ gcc version: 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC)
checking for gcc -pipe switch ... found
checking for --with-ld-opt="-static" ... not found
./configure: error: the invalid value in --with-ld-opt="-static"

make: *** [nginx/nginx] Error 1

Mark and others added 3 commits August 7, 2016 03:32
```
wget -O pcre.tar.gz http://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz
--2016-08-06 20:22:46--  http://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz
Resolving ftp.csx.cam.ac.uk (ftp.csx.cam.ac.uk)... 131.111.8.115
Connecting to ftp.csx.cam.ac.uk (ftp.csx.cam.ac.uk)|131.111.8.115|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2016-08-06 20:22:47 ERROR 404: Not Found.

make: *** [pcre.tar.gz] Error 8
```
Fix error with /usr/bin/ld
```
checking for OS
 + Linux 3.10.0-327.el7.x86_64 x86_64
checking for C compiler ... found
 + using GNU C compiler
 + gcc version: 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC)
checking for gcc -pipe switch ... found
checking for --with-ld-opt="-static" ... not found
./configure: error: the invalid value in --with-ld-opt="-static"

make: *** [nginx/nginx] Error 1
```
@ericpruitt
Copy link
Owner

Can you tell me more about your build environment? What Linux distribution are you using? When I build NGINX on Debian 8.3 with GCC 4.9.2, I don't run into this problem. If you use the version of the build rules I just pushed (6b88b31), do you still get the same error?

@crestone
Copy link
Contributor Author

crestone commented Aug 7, 2016

Environment

# cat /etc/redhat-release 
CentOS Linux release 7.2.1511 (Core) 
# uname -a
Linux centos7 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
# ld -v
GNU ld version 2.23.52.0.1-55.el7 20130226

CentOS was running on VirtualBox but in this case it's doesn't matter

@crestone
Copy link
Contributor Author

crestone commented Aug 7, 2016

I have an same error with nginx-1.11.3 and openssl-1.0.2h too but I'll try with 6b88b31

@crestone
Copy link
Contributor Author

crestone commented Aug 7, 2016

It's the same errors:

...
mkdir -p nginx
wget -O pcre.tar.gz http://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.38.tar.gz
wget -O nginx.tar.gz http://nginx.org/download/nginx-1.9.15.tar.gz
--2016-08-06 23:09:47--  http://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.38.tar.gz
Resolving ftp.csx.cam.ac.uk (ftp.csx.cam.ac.uk)... --2016-08-06 23:09:47--  http://nginx.org/download/nginx-1.9.15.tar.gz
Resolving nginx.org (nginx.org)... wget -O openssl.tar.gz http://www.openssl.org/source/openssl-1.0.1t.tar.gz
...
touch .openssl-patched
cd src && ./configure --with-cc-opt=-static --with-ld-opt=-static \
    --with-cpu-opt=generic --with-pcre=../pcre --with-mail \
    --with-ipv6 --with-poll_module --with-select_module \
...
checking for OS
 + Linux 3.10.0-327.el7.x86_64 x86_64
checking for C compiler ... found
 + using GNU C compiler
 + gcc version: 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC) 
checking for gcc -pipe switch ... found
checking for --with-ld-opt="-static" ... not found
./configure: error: the invalid value in --with-ld-opt="-static"

make: *** [nginx/nginx] Error 1

As I said earlier I think a problem with /usr/bin/ld but param -static available

# /usr/bin/ld --help
...
  -assert KEYWORD             Ignored for SunOS compatibility
  -Bdynamic, -dy, -call_shared
                              Link against shared libraries
  -Bstatic, -dn, -non_shared, -static
                              Do not link against shared libraries
  -Bsymbolic                  Bind global references locally
...

@crestone
Copy link
Contributor Author

crestone commented Aug 7, 2016

Can you check a version of /usr/bin/ld are you using?
and try build on http://isoredirect.centos.org/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1511.iso

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 this pull request may close these issues.

2 participants