On 3/30/15 6:53 , Sam M wrote:
> I had a go at compiling.
>
> Mongrel2 code includes polarssl. Unfortunately it's the compilation of
> polarssl that's failing. Pkgin has a version of polarssl (1.3), mongrel2
> wants polarssl-1.2.
>
> Unfortunately, just don't know enough C to make anything of the error codes
> or to fix it.
>
> .... <snipped>....
> cc -g -O2 -Wall -Wextra -Isrc -Isrc/polarssl/include -pthread -rdynamic
> -DNDEBUG -D_FILE_OFFSET_BITS=64 -fPIC -c -o src/task/net.o
> src/task/net.c
> In file included from /usr/include/ctype.h:36:0,
> from src/bstr/bstrlib.h:25,
> from src/bstring.h:38,
> from src/proxy.h:38,
> from src/host.h:39,
> from src/server.h:40,
> from src/task/net.c:3:
> src/polarssl/include/polarssl/dhm.h:155:9: error: expected identifier or
> '(' before numeric constant
> mpi _X; /*!< previous X */
> ^
> In file included from src/polarssl/include/polarssl/ssl.h:63:0,
> from src/server.h:42,
> from src/task/net.c:3:
> src/polarssl/include/polarssl/dhm.h:156:1: warning: no semicolon at end of
> struct or union
> }
> ^
> <builtin>: recipe for target 'src/task/net.o' failed
> make: *** [src/task/net.o] Error 1
To better understand this we'd probably need to understand the specific
source code and what it's trying to do. It's likely some missing
definition for some reason.
> And if I go directly into the polarssl source dirs, and run cmake . && make
> all to compile directly, I get the following error -
>
> .... <snipped>...
> Scanning dependencies of target dh_client
> [ 81%] Building C object
> programs/pkey/CMakeFiles/dh_client.dir/dh_client.c.o
> Linking C executable dh_client
> Undefined first referenced
> symbol in file
> bind ../../library/libpolarssl.a(net.c.o)
> accept ../../library/libpolarssl.a(net.c.o)
> listen ../../library/libpolarssl.a(net.c.o)
> gethostbyname ../../library/libpolarssl.a(net.c.o)
> socket ../../library/libpolarssl.a(net.c.o)
> setsockopt ../../library/libpolarssl.a(net.c.o)
> connect ../../library/libpolarssl.a(net.c.o)
> shutdown ../../library/libpolarssl.a(net.c.o)
> ld: fatal: symbol referencing errors. No output written to dh_client
> collect2: error: ld returned 1 exit status
> programs/pkey/CMakeFiles/dh_client.dir/build.make:86: recipe for target
> 'programs/pkey/dh_client' failed
> make[2]: *** [programs/pkey/dh_client] Error 1
> CMakeFiles/Makefile2:2237: recipe for target
> 'programs/pkey/CMakeFiles/dh_client.dir/all' failed
> make[1]: *** [programs/pkey/CMakeFiles/dh_client.dir/all] Error 2
> Makefile:127: recipe for target 'all' failed
> make: *** [all] Error 2
This is the classic case of missing -lsocket. You may be able to hack
around it with the liberal use of LDFLAGS; however, the best thing is to
actually patch the build itself.
Robert
-------------------------------------------
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription:
https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com