SilkJS icon indicating copy to clipboard operation
SilkJS copied to clipboard

libidn issue with curl on OSX 10.6.8 with gcc 4.2, with fix.

Open ieb opened this issue 11 years ago • 3 comments

I had problems linking on OSX: error was

/usr/bin/g++ -rdynamic -o silkjs main.o base64.o global.o console.o process.o net.o fs.o buffer.o http.o gd.o ncurses.o sem.o logfile.o v8.o md5.o sqlite3.o xhrhelper.o curl.o ssh2.o sftp.o memcached.o ftplib.o ftp.o editline.o popen.o linenoise.o cairo.o expat.o async.o time.o mysql.o /Users/ieb/timefields/silkjs/src/SilkJS/src/osx_dependencies/lib/mysql/libmysqlclient.a /Users/ieb/timefields/silkjs/src/SilkJS/src/osx_dependencies/lib/libcurl.a /Users/ieb/timefields/silkjs/src/SilkJS/src/osx_dependencies/lib/libmm.a /Users/ieb/timefields/silkjs/src/SilkJS/src/osx_dependencies/lib/libfreetype.a /Users/ieb/timefields/silkjs/src/SilkJS/src/osx_dependencies/lib/libgd.a /Users/ieb/timefields/silkjs/src/SilkJS/src/osx_dependencies/lib/libjpeg.a /Users/ieb/timefields/silkjs/src/SilkJS/src/osx_dependencies/lib/libpng.a /Users/ieb/timefields/silkjs/src/SilkJS/src/osx_dependencies/lib/libmemcached.a /Users/ieb/timefields/silkjs/src/SilkJS/src/osx_dependencies/lib/libssh2.a -Lv8-read-only/out/x64.release -lv8 -lncurses -lpthread -lsqlite3 -L/usr/X11/lib -lcairo -lexpat -lz -lssl -lcrypto -lpng -lfreetype -lxpm -liconv -lfontconfig -ldl -lsasl2 -lbz2 -Wl,-rpath,/usr/local/silkjs/src/v8,-rpath,v8-read-only/out/x64.release Undefined symbols: "_stringprep_locale_charset", referenced from: _fix_hostname in libcurl.a(libcurl_la-url.o) "_tld_check_lz", referenced from: _fix_hostname in libcurl.a(libcurl_la-url.o) "_idna_strerror", referenced from: _Curl_idn_strerror in libcurl.a(libcurl_la-strerror.o) "_stringprep_check_version", referenced from: _fix_hostname in libcurl.a(libcurl_la-url.o) "_idna_to_unicode_lzlz", referenced from: _fix_hostname in libcurl.a(libcurl_la-url.o) "_idn_free", referenced from: _fix_hostname in libcurl.a(libcurl_la-url.o) _Curl_disconnect in libcurl.a(libcurl_la-url.o) _Curl_disconnect in libcurl.a(libcurl_la-url.o) "_idna_to_ascii_lz", referenced from: _fix_hostname in libcurl.a(libcurl_la-url.o) "_tld_strerror", referenced from: _fix_hostname in libcurl.a(libcurl_la-url.o) ld: symbol(s) not found collect2: ld returned 1 exit status make[1]: *** [SilkJS] Error 1 make: *** [all] Error 2

Fix was:

diff --git a/src/Makefile.osx b/src/Makefile.osx index 7ef3458..c1c2a68 100644 --- a/src/Makefile.osx +++ b/src/Makefile.osx @@ -129,7 +129,7 @@ $(MM):

$(CURL): tar xzvfp dependencies/curl_7.21.6.orig.tar.gz

  •   cd $(CURL) && ./configure --prefix $(LIBDIR) --disable-ldap && make && make install
    
  •   cd $(CURL) && ./configure --prefix $(LIBDIR) --disable-ldap --without-libidn  && make && make install
    

    $(SSH2): tar xzvfp dependencies/libssh2_1.2.8.orig.tar.gz

server worked ok once built, bit I didn't give it through test, so might have broken something.

BTW, nice server.

ieb avatar Sep 28 '12 05:09 ieb

I never was an Apple/Mac fan until recently. I got a laptop specifically to build SilkJS for, and it came the day Lion was released. So I had no experience with the older versions, other than to launch the app store and install Lion.

I must say I'm loving the Mac and OSX, and I'll never buy a PC to run Windows again :)

I did install a version of Mountain Lion in a Parallels VM and it was surprisingly easy to get SilkJS to build using Homebrew. I bet that would make installing for 10.6 (and other OSX) a breeze. As I said, I've not got a lot of long term experience with OSX, so I'm not sure if Hombrew or some other package manager is what I should be supporting. There are not metrics about which one has the biggest user base, etc.

I don't see a problem with your fix. I'll apply it in the repo.

Feel free to let me know about your experience with SilkJS as you progress, or if you need any assistance.

See the silkjs group on groups.google.com.

Regards

On Sep 27, 2012, at 10:05 PM, Ian [email protected] wrote:

I had problems linking on OSX: error was

/usr/bin/g++ -rdynamic -o silkjs main.o base64.o global.o console.o process.o net.o fs.o buffer.o http.o gd.o ncurses.o sem.o logfile.o v8.o md5.o sqlite3.o xhrhelper.o curl.o ssh2.o sftp.o memcached.o ftplib.o ftp.o editline.o popen.o linenoise.o cairo.o expat.o async.o time.o mysql.o /Users/ieb/timefields/silkjs/src/SilkJS/src/osx_dependencies/lib/mysql/libmysqlclient.a /Users/ieb/timefields/silkjs/src/SilkJS/src/osx_dependencies/lib/libcurl.a /Users/ieb/timefields/silkjs/src/SilkJS/src/osx_dependencies/lib/libmm.a /Users/ieb/timefields/silkjs/src/SilkJS/src/osx_dependencies/lib/libfreetype.a /Users/ieb/timefields/silkjs/src/SilkJS/src/osx_dependencies/lib/libgd.a /Users/ieb/timefields/silkjs/src/SilkJS/src/osx_dependencies/lib/libjpeg.a /Users/ieb/timefields/silkjs/src/SilkJS/src/osx_dependencies/lib/libpng.a /Users/ieb/timefields/silkjs/src/SilkJS/src/osx_dependencies/lib/libmemcached.a /Users/ieb/timefields/silkjs/src/SilkJS/src/osx_dependencies/lib/libssh2.a -Lv8-read-only/out/x64.release -lv8 -lncurses -lpthread -lsqlite3 -L/usr/X11/lib -lcairo -lexpat -lz -lssl -lcrypto -lpng -lfreetype -lxpm -liconv -lfontconfig -ldl -lsasl2 -lbz2 -Wl,-rpath,/usr/local/silkjs/src/v8,-rpath,v8-read-only/out/x64.release Undefined symbols: "_stringprep_locale_charset", referenced from: _fix_hostname in libcurl.a(libcurl_la-url.o) "_tld_check_lz", referenced from: _fix_hostname in libcurl.a(libcurl_la-url.o) "_idna_strerror", referenced from: _Curl_idn_strerror in libcurl.a(libcurl_la-strerror.o) "_stringprep_check_version", referenced from: _fix_hostname in libcurl.a(libcurl_la-url.o) "_idna_to_unicode_lzlz", referenced from: _fix_hostname in libcurl.a(libcurl_la-url.o) "_idn_free", referenced from: _fix_hostname in libcurl.a(libcurl_la-url.o) _Curl_disconnect in libcurl.a(libcurl_la-url.o) _Curl_disconnect in libcurl.a(libcurl_la-url.o) "_idna_to_ascii_lz", referenced from: _fix_hostname in libcurl.a(libcurl_la-url.o) "_tld_strerror", referenced from: _fix_hostname in libcurl.a(libcurl_la-url.o) ld: symbol(s) not found collect2: ld returned 1 exit status make[1]: *** [SilkJS] Error 1 make: *** [all] Error 2

Fix was:

diff --git a/src/Makefile.osx b/src/Makefile.osx index 7ef3458..c1c2a68 100644 --- a/src/Makefile.osx +++ b/src/Makefile.osx @@ -129,7 +129,7 @@ $(MM):

$(CURL): tar xzvfp dependencies/curl_7.21.6.orig.tar.gz

cd $(CURL) && ./configure --prefix $(LIBDIR) --disable-ldap && make && make install cd $(CURL) && ./configure --prefix $(LIBDIR) --disable-ldap --without-libidn && make && make install $(SSH2): tar xzvfp dependencies/libssh2_1.2.8.orig.tar.gz

server worked ok once built, bit I didn't give it through test, so might have broken something.

BTW, nice server.

— Reply to this email directly or view it on GitHub.

mschwartz avatar Sep 28 '12 12:09 mschwartz

I switched to OSX in 2005 and have never looked back or had to rebuild a machine, which is probably why my OS image may be a bit of a mess. I have used "port" for years and although its slow it works ok.

I do like the way you pull in the dependencies and build them. Although it increases the footprint, it makes everything more stable, and appears to have practically no impact on the size of each worker which seems to hover around 8MB under load.

Very interested in the approach since it seems to offer the potential speed and low footprint of pure C without the risks and without the mild event driven insanity of Node.js. What (imho) would make it a killer app is to have components comparable to something like Django, then it would deliver raw speed during implementation and in production.

On 28 September 2012 22:08, Michael Schwartz [email protected]:

I never was an Apple/Mac fan until recently. I got a laptop specifically to build SilkJS for, and it came the day Lion was released. So I had no experience with the older versions, other than to launch the app store and install Lion.

I must say I'm loving the Mac and OSX, and I'll never buy a PC to run Windows again :)

I did install a version of Mountain Lion in a Parallels VM and it was surprisingly easy to get SilkJS to build using Homebrew. I bet that would make installing for 10.6 (and other OSX) a breeze. As I said, I've not got a lot of long term experience with OSX, so I'm not sure if Hombrew or some other package manager is what I should be supporting. There are not metrics about which one has the biggest user base, etc.

I don't see a problem with your fix. I'll apply it in the repo.

Feel free to let me know about your experience with SilkJS as you progress, or if you need any assistance.

See the silkjs group on groups.google.com.

Regards

On Sep 27, 2012, at 10:05 PM, Ian [email protected] wrote:

I had problems linking on OSX: error was

/usr/bin/g++ -rdynamic -o silkjs main.o base64.o global.o console.o process.o net.o fs.o buffer.o http.o gd.o ncurses.o sem.o logfile.o v8.o md5.o sqlite3.o xhrhelper.o curl.o ssh2.o sftp.o memcached.o ftplib.o ftp.o editline.o popen.o linenoise.o cairo.o expat.o async.o time.o mysql.o /Users/ieb/timefields/silkjs/src/SilkJS/src/osx_dependencies/lib/mysql/libmysqlclient.a /Users/ieb/timefields/silkjs/src/SilkJS/src/osx_dependencies/lib/libcurl.a /Users/ieb/timefields/silkjs/src/SilkJS/src/osx_dependencies/lib/libmm.a /Users/ieb/timefields/silkjs/src/SilkJS/src/osx_dependencies/lib/libfreetype.a /Users/ieb/timefields/silkjs/src/SilkJS/src/osx_dependencies/lib/libgd.a /Users/ieb/timefields/silkjs/src/SilkJS/src/osx_dependencies/lib/libjpeg.a /Users/ieb/timefields/silkjs/src/SilkJS/src/osx_dependencies/lib/libpng.a /Users/ieb/timefields/silkjs/src/SilkJS/src/osx_dependencies/lib/libmemcached.a /Users/ieb/timefields/silkjs/src/SilkJS/src/osx_dependencies/lib/libssh2.a -Lv8-read-only/out/x64.release -lv8 -lncurses -lpthread -lsqlite3 -L/usr/X11/lib -lcairo -lexpat -lz -lssl -lcrypto -lpng -lfreetype -lxpm -liconv -lfontconfig -ldl -lsasl2 -lbz2 -Wl,-rpath,/usr/local/silkjs/src/v8,-rpath,v8-read-only/out/x64.release Undefined symbols: "_stringprep_locale_charset", referenced from: _fix_hostname in libcurl.a(libcurl_la-url.o) "_tld_check_lz", referenced from: _fix_hostname in libcurl.a(libcurl_la-url.o) "_idna_strerror", referenced from: _Curl_idn_strerror in libcurl.a(libcurl_la-strerror.o) "_stringprep_check_version", referenced from: _fix_hostname in libcurl.a(libcurl_la-url.o) "_idna_to_unicode_lzlz", referenced from: _fix_hostname in libcurl.a(libcurl_la-url.o) "_idn_free", referenced from: _fix_hostname in libcurl.a(libcurl_la-url.o) _Curl_disconnect in libcurl.a(libcurl_la-url.o) _Curl_disconnect in libcurl.a(libcurl_la-url.o) "_idna_to_ascii_lz", referenced from: _fix_hostname in libcurl.a(libcurl_la-url.o) "_tld_strerror", referenced from: _fix_hostname in libcurl.a(libcurl_la-url.o) ld: symbol(s) not found collect2: ld returned 1 exit status make[1]: *** [SilkJS] Error 1 make: *** [all] Error 2

Fix was:

diff --git a/src/Makefile.osx b/src/Makefile.osx index 7ef3458..c1c2a68 100644 --- a/src/Makefile.osx +++ b/src/Makefile.osx @@ -129,7 +129,7 @@ $(MM):

$(CURL): tar xzvfp dependencies/curl_7.21.6.orig.tar.gz

cd $(CURL) && ./configure --prefix $(LIBDIR) --disable-ldap && make && make install cd $(CURL) && ./configure --prefix $(LIBDIR) --disable-ldap --without-libidn && make && make install $(SSH2): tar xzvfp dependencies/libssh2_1.2.8.orig.tar.gz

server worked ok once built, bit I didn't give it through test, so might have broken something.

BTW, nice server.

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/mschwartz/SilkJS/issues/26#issuecomment-8974466.

ieb avatar Sep 28 '12 22:09 ieb

I'm not sure what you mean by components.

SilkJS supports both compiled C++ dynamically loadable modules and CommonJS require() style JavaScript modules. V8 is really fast - I measure about the same as unoptimized compiled C code. It may be even faster once the JIT optimizer kicks in.

I'd think that being able to augment your server simply by loading the JavaScripts of your choice at start time and have all that code optimized over time is a big win.

On Sep 28, 2012, at 3:47 PM, Ian [email protected] wrote:

I switched to OSX in 2005 and have never looked back or had to rebuild a machine, which is probably why my OS image may be a bit of a mess. I have used "port" for years and although its slow it works ok.

I do like the way you pull in the dependencies and build them. Although it increases the footprint, it makes everything more stable, and appears to have practically no impact on the size of each worker which seems to hover around 8MB under load.

Very interested in the approach since it seems to offer the potential speed and low footprint of pure C without the risks and without the mild event driven insanity of Node.js. What (imho) would make it a killer app is to have components comparable to something like Django, then it would deliver raw speed during implementation and in production.

On 28 September 2012 22:08, Michael Schwartz [email protected]:

I never was an Apple/Mac fan until recently. I got a laptop specifically to build SilkJS for, and it came the day Lion was released. So I had no experience with the older versions, other than to launch the app store and install Lion.

I must say I'm loving the Mac and OSX, and I'll never buy a PC to run Windows again :)

I did install a version of Mountain Lion in a Parallels VM and it was surprisingly easy to get SilkJS to build using Homebrew. I bet that would make installing for 10.6 (and other OSX) a breeze. As I said, I've not got a lot of long term experience with OSX, so I'm not sure if Hombrew or some other package manager is what I should be supporting. There are not metrics about which one has the biggest user base, etc.

I don't see a problem with your fix. I'll apply it in the repo.

Feel free to let me know about your experience with SilkJS as you progress, or if you need any assistance.

See the silkjs group on groups.google.com.

Regards

On Sep 27, 2012, at 10:05 PM, Ian [email protected] wrote:

I had problems linking on OSX: error was

/usr/bin/g++ -rdynamic -o silkjs main.o base64.o global.o console.o process.o net.o fs.o buffer.o http.o gd.o ncurses.o sem.o logfile.o v8.o md5.o sqlite3.o xhrhelper.o curl.o ssh2.o sftp.o memcached.o ftplib.o ftp.o editline.o popen.o linenoise.o cairo.o expat.o async.o time.o mysql.o /Users/ieb/timefields/silkjs/src/SilkJS/src/osx_dependencies/lib/mysql/libmysqlclient.a /Users/ieb/timefields/silkjs/src/SilkJS/src/osx_dependencies/lib/libcurl.a /Users/ieb/timefields/silkjs/src/SilkJS/src/osx_dependencies/lib/libmm.a /Users/ieb/timefields/silkjs/src/SilkJS/src/osx_dependencies/lib/libfreetype.a /Users/ieb/timefields/silkjs/src/SilkJS/src/osx_dependencies/lib/libgd.a /Users/ieb/timefields/silkjs/src/SilkJS/src/osx_dependencies/lib/libjpeg.a /Users/ieb/timefields/silkjs/src/SilkJS/src/osx_dependencies/lib/libpng.a /Users/ieb/timefields/silkjs/src/SilkJS/src/osx_dependencies/lib/libmemcached.a /Users/ieb/timefields/silkjs/src/SilkJS/src/osx_dependencies/lib/libssh2.a -Lv8-read-only/out/x64.release -lv8 -lncurses -lpthread -lsqlite3 -L/usr/X11/lib -lcairo -lexpat -lz -lssl -lcrypto -lpng -lfreetype -lxpm -liconv -lfontconfig -ldl -lsasl2 -lbz2 -Wl,-rpath,/usr/local/silkjs/src/v8,-rpath,v8-read-only/out/x64.release Undefined symbols: "_stringprep_locale_charset", referenced from: _fix_hostname in libcurl.a(libcurl_la-url.o) "_tld_check_lz", referenced from: _fix_hostname in libcurl.a(libcurl_la-url.o) "_idna_strerror", referenced from: _Curl_idn_strerror in libcurl.a(libcurl_la-strerror.o) "_stringprep_check_version", referenced from: _fix_hostname in libcurl.a(libcurl_la-url.o) "_idna_to_unicode_lzlz", referenced from: _fix_hostname in libcurl.a(libcurl_la-url.o) "_idn_free", referenced from: _fix_hostname in libcurl.a(libcurl_la-url.o) _Curl_disconnect in libcurl.a(libcurl_la-url.o) _Curl_disconnect in libcurl.a(libcurl_la-url.o) "_idna_to_ascii_lz", referenced from: _fix_hostname in libcurl.a(libcurl_la-url.o) "_tld_strerror", referenced from: _fix_hostname in libcurl.a(libcurl_la-url.o) ld: symbol(s) not found collect2: ld returned 1 exit status make[1]: *** [SilkJS] Error 1 make: *** [all] Error 2

Fix was:

diff --git a/src/Makefile.osx b/src/Makefile.osx index 7ef3458..c1c2a68 100644 --- a/src/Makefile.osx +++ b/src/Makefile.osx @@ -129,7 +129,7 @@ $(MM):

$(CURL): tar xzvfp dependencies/curl_7.21.6.orig.tar.gz

cd $(CURL) && ./configure --prefix $(LIBDIR) --disable-ldap && make && make install cd $(CURL) && ./configure --prefix $(LIBDIR) --disable-ldap --without-libidn && make && make install $(SSH2): tar xzvfp dependencies/libssh2_1.2.8.orig.tar.gz

server worked ok once built, bit I didn't give it through test, so might have broken something.

BTW, nice server.

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/mschwartz/SilkJS/issues/26#issuecomment-8974466.

— Reply to this email directly or view it on GitHub.

mschwartz avatar Sep 29 '12 01:09 mschwartz