bugGNU Wget - Bugs: bug #48634, MAC OS : Building with...

 
 

bug #48634: MAC OS : Building with "--with-ssl=openssl" error

Submitter:  None
Submitted:  Tue 26 Jul 2016 10:00:46 AM UTC
   
 
Category:  Build/Install Severity:  3 - Normal
Priority:  5 - Normal Status:  None
Privacy:  Public Assigned to:  None
Originator Name:  Corentin Originator Email:  -email is unavailable-
Open/Closed:  Open Release:  1.18
Operating System:  Mac OS Reproducibility:  Every Time
Fixed Release:  None Planned Release:  None
Regression:  None Work Required:  None
Patch Included:  No
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 30 Jul 2016 03:37:09 PM UTC, comment #4: 


> Also won't it prevent wget from using the ssl protocol?


Doesn't invoking ./configure without params default to GNUTLS? What's the status of GNUTLS on Mac OS X?

Ander Juaristi <ajuaristi>
Tue 26 Jul 2016 02:00:53 PM UTC, comment #3: 

Yes, point 3 (without TLS) is not really an option if you want to contact the 'outside'.

> Also I'd like to point out I could probably propose a fix myself
> but I have never make the step so far to involve in GNU
> contribution (can be scary at first).


Please go ahead !
We really appreciate any help and I don't need to point out that we currently have no active OSX developer here.
Don't mind to ask us any questions.

The FSF copyright assignment is not complicated.
But let's talk about that when it's time to do it.

Tim Ruehsen <rockdaboot>
Group administrator
Tue 26 Jul 2016 12:55:11 PM UTC, comment #2: 

About the 3rd point first :
Trying to configure without --with-ssl=openssl end up failing with the make.

---

if [ -n "libcrypto.1.0.0.dylib libssl.1.0.0.dylib" ]; then \
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f ../../Makefile.shared -e \
LIBNAME=gost \
LIBEXTRAS='e_gost_err.o gost2001_keyx.o gost2001.o gost89.o gost94_keyx.o gost_ameth.o gost_asn1.o gost_crypt.o gost_ctl.o gost_eng.o gosthash.o gost_keywrap.o gost_md.o gost_params.o gost_pmeth.o gost_sign.o' \
LIBDEPS='-L../.. -lcrypto' \
link_o.darwin-shared; \
else \
ar  r ../../libcrypto.a e_gost_err.o gost2001_keyx.o gost2001.o gost89.o gost94_keyx.o gost_ameth.o gost_asn1.o gost_crypt.o gost_ctl.o gost_eng.o gosthash.o gost_keywrap.o gost_md.o gost_params.o gost_pmeth.o gost_sign.o; \
fi
ld: can't write output file: libgost.dylib for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: * [link_o.darwin] Error 1
make[2]: * [lib] Error 2
make[1]: * [subdirs] Error 1
make: * [build_engines] Error 1

---

Also won't it prevent wget from using the ssl protocol?


About the second point :
I have no idea where to look (no ssl.h anywhere) nor how to do that.


Finally :
I ended up building my own copy but to use it I didn't find the configure option and ended up using the flag as proposed here : http://stackoverflow.com/questions/9817337/compiling-wget-with-static-linking-self-compiled-openssl-library-linking-issu

---

$>env CPPFLAGS="-I/dir/to/openssl/include" LDFLAGS="-L/dir/to/ssl/lib" ./configure --with-ssl=openssl

$>make CPPFLAGS="-I/dir/to/openssl/include" LDFLAGS="-L/dir/to/ssl/lib -all-static"

---

I don't feel it was done nicely in the end, maybe it could be enhanced.

Also I'd like to point out I could probably propose a fix myself but I have never make the step so far to involve in GNU contribution (can be scary at first).

This is no about saying anything was done badly.

Corentin <kajika>
Tue 26 Jul 2016 12:39:59 PM UTC, comment #1: 

From your link:
o We recommend that developers who need OpenSSL build their own copy of it and include that copy in their app.  Alternatively you can use native OS X APIs, like Secure Transport.

You now have three possibilities:
1. build your own copy of OpenSSL
2. create a patch to use native OS X APIs
3. do not use --with-ssl=openssl with ./configure

Tim Ruehsen <rockdaboot>
Group administrator
Tue 26 Jul 2016 10:00:46 AM UTC, original submission:  

After configuring wget 1.18 with the command :
./configure --with-ssl=openssl


The make fails with the report :

---

if test -n ""; then cp "./build_info.c.in" .; fi
/usr/bin/perl "../build-aux/build_info.pl" \
    "../src/build_info.c"
if test -n ""; then rm -f build_info.c.in; fi
  CC       build_info.o
echo '/* version.c */' > version.c
echo '/* Autogenerated by Makefile - DO NOT EDIT */' >> version.c
echo '' >> version.c
echo '#include "version.h"' >> version.c
echo 'const char *version_string = "1.18";' >> version.c
echo 'const char *compilation_string = "'gcc -DHAVE_CONFIG_H -DSYSTEM_WGETRC=\"/usr/local/etc/wgetrc\" -DLOCALEDIR=\"/usr/local/share/locale\" -I.  -I../lib -I../lib   -I/usr/local/include  -DHAVE_LIBSSL  -DNDEBUG '";' \
    | sed -e 's/[\\"]/\\&/g' -e 's/\\"/"/' -e 's/\\";$/";/' >> version.c
echo 'const char *link_string = "'gcc  -I/usr/local/include  -DHAVE_LIBSSL  -DNDEBUG  \
  -liconv  -lssl -lcrypto -lz -lz   ftp-opie.o openssl.o http-ntlm.o ../lib/libgnu.a'";' \
    | sed -e 's/[\\"]/\\&/g' -e 's/\\"/"/' -e 's/\\";$/";/' >> version.c
  CC       version.o
  CC       ftp-opie.o
  CC       openssl.o
openssl.c:40:10: fatal error: 'openssl/ssl.h' file not found
#include <openssl/ssl.h>
         ^
1 error generated.
make[3]: * [openssl.o] Error 1
make[2]: * [all] Error 2
make[1]: * [all-recursive] Error 1
make: * [all] Error 2

It seems that Apple stop shipping openSSL with their OS ( src : http://lists.apple.com/archives/macnetworkprog/2015/Jun/msg00025.html )

---

Maybe the configure should be updated.


Relevant information :

  • OS X El Capitan 10.11.6
  • gcc (probably from xcode's installation)


---

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/c++/4.2.1
Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

---

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by ajuaristi (Posted a comment)
  • -email is unavailable- added by kajika (Posted a comment)
  • -email is unavailable- added by rockdaboot (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code