Wget And Gcc For Mac

1015
  1. Os X Wget

Belkin f5u409 driver for mac. I am trying to install lynx / wget on my mac. And installation requires gcc to compile. I have gcc in my /usr/local/bin dir. I see that it is very much there. Jul 29, 2009  However, assuming you only want gcc, the doc seems to be saying gcc 4.2 requires an OS X SDK: GCC 4.2 is a new optional compiler with stricter C and C++ language enforcement, security enhancements, performance optimizations, and bug fixes over GCC 4.0. Requires the Mac OS X 10.5 SDK or 'Current OS' SDK I don't know why gcc needs the SDK.

I downloaded the source code of wget and tried a static compilation. These are the steps that I followed:./configure LDFLAGS=-static At the end the output shown is as follows: Version: 1.17 Host OS: linux-gnu Install prefix: /usr/local Compiler: gcc CFlags: -I/usr/include/p11-kit-1 -DHAVELIBGNUTLS -DNDEBUG LDFlags: -static Libs: -lpcre -lgnutls -lz SSL: gnutls Zlib: yes PSL: no Digest: yes NTLM: auto OPIE: yes Debugging: yes Assertions: no Valgrind: Valgrind testing not enabled Metalink: no GPGME: no Then I used make. This throws a long list of errors. For static linking, ld will not do the job of automatic searching for dependencies for wget like it magically does for shared objects. Some scripts try to make such a list for you, others not. You hit the latter case.

You need to make the list of libraries and their dependencies yourself. If you don't yet know what is complete list of deps for your static wget binary, you need first to build it as normal (shared) and then obtain such a list with ldd /path/to/wget, where /path/to/wget is your wget built binary (it can be found inside the source tree, usually something like src/wget) You will need to obtain all the static versions of shared libraries. They usually contained in -dev or devel packages your distribution provides. Each library in list must be rearranged or appended twice or more times because ld does not try to search all static archives for specific symbol and errors out. So, your libgnutls.a probably depends on libtasn1.a for asn1. symbols.

Wget and gcc for mac

Os X Wget

Then you need to append this to command line: -lgnutls -ltasn1. If one more library then depends on libtasn1.a, you'll need to append it again to the link command line. Undefined symbols can be resolved by looking into symbol list of static library with nm /usr/lib/lib.a. Or finding that library in certain directory with fgrep -l symbolname /usr/lib/.a.

Note such a search (with fgrep) will show both libraries that require and provide such a symbol, so it's only a quick test. Libraries can be appended with LIBS= variable to configure script: LIBS='-lgnutls -ltasn1'.

Influxd 8888888.d888 8b. 888 d88P' 888 888 'Y88b 888 '88b 888 888 888 888 888 888.88P 888 88888b. 888888 888 888 888 888 888 888 8K. 888 888 '88b 888 888 888 888 Y8bd8P' 888 888 888 'Y88b 888 888 888 888 888 888 888 X88K 888 888 888 888 888 888 888 888 888 Y88b 888.d8'8b. 888.d88P 888 d88P 8888888 888 888 888 888 'Y88888 888 8P' 8888888P' run 2016/08/25 18:25:09 InfluxDB starting, version unknown, branch unknown, commit unknown run 2016/08/25 18:25:09 Go version go1.7, GOMAXPROCS set to 2 run 2016/08/25 18:25:09 no configuration provided, using default settings.

This entry was posted on 15.10.2019.