Unable to compile source for Hiawatha on SmartOS (formerly OpenSolaris) - JoyentCloud
Brian Zerangue
12 September 2012, 09:17
Hello. I'm running into the following error when I follow the compiling Hiawatha on SmartOS (a Solaris product).
First, it was balking at the PolarSSL, having issues with the include of endian.h inside of polarssl/library/net.c file. And then I ran across this patch (http://permalink.gmane.org/gmane.network.dns.powerdns.devel/1172)
...And here is a patch for SunOS 5.10 (Solaris 10) for the above, (also as an attachment to this e-mail):
--- pdns/ext/polarssl/library/net.c.orig Mon Apr 2 13:38:22 2012
+++ pdns/ext/polarssl/library/net.c Mon Apr 2 13:39:31 2012
@@ -59,6 +59,8 @@
#include <sys/endian.h>
#elif defined(__APPLE__)
#include <machine/endian.h>
+#elif defined(sun)
+#include <sys/isa_defs.h>
#else
#include <endian.h>
#endif
ADDING THE ELSE IF (elif) for Sun, seemed to fix the PolarSSL break.
AFTER THAT FIX, then when I tried to compile, running sudo make install/strip and I get this output...
Scanning dependencies of target cgi-wrapper
[ 1%] Building C object CMakeFiles/cgi-wrapper.dir/src/alternative.c.o
[ 2%] Building C object CMakeFiles/cgi-wrapper.dir/src/cgi-wrapper.c.o
[ 3%] Building C object CMakeFiles/cgi-wrapper.dir/src/userconfig.c.o
[ 4%] Building C object CMakeFiles/cgi-wrapper.dir/src/libfs.c.o
[ 5%] Building C object CMakeFiles/cgi-wrapper.dir/src/libstr.c.o
Linking C executable cgi-wrapper
[ 5%] Built target cgi-wrapper
Scanning dependencies of target polarssl
[ 6%] Building C object polarssl/library/CMakeFiles/polarssl.dir/aes.c.o
[ 8%] Building C object polarssl/library/CMakeFiles/polarssl.dir/arc4.c.o
[ 9%] Building C object polarssl/library/CMakeFiles/polarssl.dir/asn1parse.c.o
[ 10%] Building C object polarssl/library/CMakeFiles/polarssl.dir/base64.c.o
[ 11%] Building C object polarssl/library/CMakeFiles/polarssl.dir/bignum.c.o
[ 12%] Building C object polarssl/library/CMakeFiles/polarssl.dir/camellia.c.o
[ 13%] Building C object polarssl/library/CMakeFiles/polarssl.dir/certs.c.o
[ 14%] Building C object polarssl/library/CMakeFiles/polarssl.dir/cipher.c.o
[ 16%] Building C object polarssl/library/CMakeFiles/polarssl.dir/cipher_wrap.c.o
[ 17%] Building C object polarssl/library/CMakeFiles/polarssl.dir/ctr_drbg.c.o
[ 18%] Building C object polarssl/library/CMakeFiles/polarssl.dir/debug.c.o
[ 19%] Building C object polarssl/library/CMakeFiles/polarssl.dir/des.c.o
[ 20%] Building C object polarssl/library/CMakeFiles/polarssl.dir/dhm.c.o
[ 21%] Building C object polarssl/library/CMakeFiles/polarssl.dir/entropy.c.o
[ 22%] Building C object polarssl/library/CMakeFiles/polarssl.dir/entropy_poll.c.o
[ 24%] Building C object polarssl/library/CMakeFiles/polarssl.dir/error.c.o
[ 25%] Building C object polarssl/library/CMakeFiles/polarssl.dir/havege.c.o
[ 26%] Building C object polarssl/library/CMakeFiles/polarssl.dir/md.c.o
[ 27%] Building C object polarssl/library/CMakeFiles/polarssl.dir/md_wrap.c.o
[ 28%] Building C object polarssl/library/CMakeFiles/polarssl.dir/md2.c.o
[ 29%] Building C object polarssl/library/CMakeFiles/polarssl.dir/md4.c.o
[ 31%] Building C object polarssl/library/CMakeFiles/polarssl.dir/md5.c.o
[ 32%] Building C object polarssl/library/CMakeFiles/polarssl.dir/net.c.o
[ 33%] Building C object polarssl/library/CMakeFiles/polarssl.dir/padlock.c.o
[ 34%] Building C object polarssl/library/CMakeFiles/polarssl.dir/pem.c.o
[ 35%] Building C object polarssl/library/CMakeFiles/polarssl.dir/pkcs11.c.o
[ 36%] Building C object polarssl/library/CMakeFiles/polarssl.dir/rsa.c.o
[ 37%] Building C object polarssl/library/CMakeFiles/polarssl.dir/sha1.c.o
[ 39%] Building C object polarssl/library/CMakeFiles/polarssl.dir/sha2.c.o
[ 40%] Building C object polarssl/library/CMakeFiles/polarssl.dir/sha4.c.o
[ 41%] Building C object polarssl/library/CMakeFiles/polarssl.dir/ssl_cli.c.o
[ 42%] Building C object polarssl/library/CMakeFiles/polarssl.dir/ssl_srv.c.o
[ 43%] Building C object polarssl/library/CMakeFiles/polarssl.dir/ssl_tls.c.o
[ 44%] Building C object polarssl/library/CMakeFiles/polarssl.dir/timing.c.o
[ 45%] Building C object polarssl/library/CMakeFiles/polarssl.dir/version.c.o
[ 47%] Building C object polarssl/library/CMakeFiles/polarssl.dir/x509parse.c.o
[ 48%] Building C object polarssl/library/CMakeFiles/polarssl.dir/xtea.c.o
Linking C shared library libpolarssl.so
[ 48%] Built target polarssl
Scanning dependencies of target hiawatha
[ 49%] Building C object CMakeFiles/hiawatha.dir/src/alternative.c.o
[ 50%] Building C object CMakeFiles/hiawatha.dir/src/cache.c.o
/root/sources/hiawatha-8.5/src/cache.c: In function 'add_file_to_cache':
/root/sources/hiawatha-8.5/src/cache.c:156:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
[ 51%] Building C object CMakeFiles/hiawatha.dir/src/cgi.c.o
[ 52%] Building C object CMakeFiles/hiawatha.dir/src/client.c.o
[ 54%] Building C object CMakeFiles/hiawatha.dir/src/envir.c.o
[ 55%] Building C object CMakeFiles/hiawatha.dir/src/hiawatha.c.o
[ 56%] Building C object CMakeFiles/hiawatha.dir/src/http.c.o
[ 57%] Building C object CMakeFiles/hiawatha.dir/src/httpauth.c.o
[ 58%] Building C object CMakeFiles/hiawatha.dir/src/libfs.c.o
[ 59%] Building C object CMakeFiles/hiawatha.dir/src/libip.c.o
[ 60%] Building C object CMakeFiles/hiawatha.dir/src/liblist.c.o
[ 62%] Building C object CMakeFiles/hiawatha.dir/src/libssl.c.o
[ 63%] Building C object CMakeFiles/hiawatha.dir/src/libstr.c.o
[ 64%] Building C object CMakeFiles/hiawatha.dir/src/log.c.o
[ 65%] Building C object CMakeFiles/hiawatha.dir/src/mimetype.c.o
[ 66%] Building C object CMakeFiles/hiawatha.dir/src/monitor.c.o
[ 67%] Building C object CMakeFiles/hiawatha.dir/src/rproxy.c.o
[ 68%] Building C object CMakeFiles/hiawatha.dir/src/send.c.o
[ 70%] Building C object CMakeFiles/hiawatha.dir/src/serverconfig.c.o
[ 71%] Building C object CMakeFiles/hiawatha.dir/src/session.c.o
[ 72%] Building C object CMakeFiles/hiawatha.dir/src/target.c.o
/root/sources/hiawatha-8.5/src/target.c: In function 'execute_cgi':
/root/sources/hiawatha-8.5/src/target.c:705:60: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
/root/sources/hiawatha-8.5/src/target.c:907:68: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
[ 73%] Building C object CMakeFiles/hiawatha.dir/src/tomahawk.c.o
[ 74%] Building C object CMakeFiles/hiawatha.dir/src/toolkit.c.o
[ 75%] Building C object CMakeFiles/hiawatha.dir/src/userconfig.c.o
[ 77%] Building C object CMakeFiles/hiawatha.dir/src/xslt.c.o
Linking C executable hiawatha
Undefined first referenced
symbol in file
bind CMakeFiles/hiawatha.dir/src/hiawatha.c.o (symbol belongs to implicit dependency /lib/libsocket.so.1)
recv CMakeFiles/hiawatha.dir/src/cgi.c.o (symbol belongs to implicit dependency /lib/libsocket.so.1)
send CMakeFiles/hiawatha.dir/src/send.c.o (symbol belongs to implicit dependency /lib/libsocket.so.1)
accept CMakeFiles/hiawatha.dir/src/hiawatha.c.o (symbol belongs to implicit dependency /lib/libsocket.so.1)
listen CMakeFiles/hiawatha.dir/src/hiawatha.c.o (symbol belongs to implicit dependency /lib/libsocket.so.1)
gethostbyname CMakeFiles/hiawatha.dir/src/libip.c.o (symbol belongs to implicit dependency /lib/libnsl.so.1)
socket CMakeFiles/hiawatha.dir/src/cgi.c.o (symbol belongs to implicit dependency /lib/libsocket.so.1)
setsockopt CMakeFiles/hiawatha.dir/src/hiawatha.c.o (symbol belongs to implicit dependency /lib/libsocket.so.1)
connect CMakeFiles/hiawatha.dir/src/cgi.c.o (symbol belongs to implicit dependency /lib/libsocket.so.1)
inet_pton CMakeFiles/hiawatha.dir/src/libip.c.o (symbol belongs to implicit dependency /lib/libnsl.so.1)
inet_ntop CMakeFiles/hiawatha.dir/src/hiawatha.c.o (symbol belongs to implicit dependency /lib/libnsl.so.1)
ld: fatal: symbol referencing errors. No output written to hiawatha
collect2: error: ld returned 1 exit status
make[2]: *** [hiawatha] Error 1
make[1]: *** [CMakeFiles/hiawatha.dir/all] Error 2
make: *** [all] Error 2
--
Can you help me make sense of this output??? Do you know what might need to be fixed???
Thanks for your help!!!!
Hiawatha version: 8.5
Operating System: SmartOS, http://smartos.org/ (Open Solaris) - Joyent Cloud
Hugo Leisink
12 September 2012, 10:11
I've managed to install cmake via pkgin, but when I install the gcc47 package, there is no gcc available. How do I install gcc on SmartOS?
Brian Zerangue
12 September 2012, 15:06
I found this...
To see what packages are available if you know the tool you want to install, you can run the 'pkgin available' command and grep for the tool name:
# pkgin available | grep gcc
gcc-compiler-4.5.2 GNU Compiler Collection 4.5
gcc-runtime-4.5.2 GNU Compiler Collection 4.5 Runtime libs
gcc-tools-0 Subset of binutils needed for GCC
To install gcc, I ran:
# pkgin install gcc-compiler-4.5.2 gcc-runtime-4.5.2 gcc-tools-0
Similarly, I installed gmake and automake:
# pkgin install gmake automake
--
Source:
http://agiletesting.blogspot.com/2012/06/installing-and-using-sysbench-on-joyent.html?m=1
Hugo Leisink
12 September 2012, 16:01
Nope, all I get is "gcc47" and "gcc47-runtime". Both packages don't give me the gcc compiler.
Brian Zerangue
12 September 2012, 16:55
I ran across this post about GCC in SmartOS, http://old.nabble.com/Support-GCC-runtime-p34204826.html
I don't know if this is helpful or not.
Hugo Leisink
12 September 2012, 16:55
No, it doesn't. Sorry, but this costs too much of my time. SmartOS is hereby not supported.
It's too much hustle to simply install a compiler. I just can't take this SmartOS seriously.
Brian Zerangue
12 September 2012, 17:44
> No, it doesn't. Sorry, but this costs too much of my time. SmartOS is hereby not supported.
It's too much hustle to simply install a compiler. I just can't take this SmartOS seriously.
Sorry, that I've wasted your time.
For what's worth, my Joyent Cloud machine (http://wiki.joyent.com/display/jpc2/SmartMachine+Standard) is running the following...
gcc47-4.7.0nb1 The GNU Compiler Collection (GCC) - 4.7 Release Series
gcc47-runtime-4.7.0nb1 The GNU Compiler Collection (GCC) - 4.7 Release Series
With that, I was able to compile CMake with no problems.
It's just the compiling of Hiawatha that I'm having the problem with. I'll do some more research, and ask the folks at Joyent how they got the compiler installed. If I can find a way for it to be installed without a hassle, would you consider supporting it, if it was easier to install the compiler?
Hugo Leisink
12 September 2012, 17:55
Sure, no problem. How about you provide me with a VMware image that has all the compiler stuff properly installed? And don't forget the libraries that are required for Hiawatha, like pthread and xml/xslt.
Brian Zerangue
12 September 2012, 18:00
I'll see what I can do.
This topic has been closed.