Ticket #161 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

net6-1.3.0rc1 doesn't build with GCC 3.3.5

Reported by: anonymous Owned by: armin
Priority: normal Milestone:
Component: net6 Version:
Severity: normal Keywords:
Cc: Launchpad Bug:

Description

net6-1.3.0rc1 doesn't seem to build with GCC 3.3.5, although I have tried it on OpenBSD, it doesn't seem like an OpenBSD-specific problem.

c++ -DHAVE_CONFIG_H -I. -I. -I./inc -I/usr/local/include/sigc++-2.0 
-I/usr/local/lib/sigc++-2.0/include -I/usr/local/include -I/usr/local/include 
-I/usr/local/include -Iinc -DLOCALEDIR=\"/usr/local/share/locale\" -I/usr/local/include -O2 -pipe
-MT libnet6_la-socket.lo -MD -MP -MF .deps/libnet6_la-socket.Tpo -c src/socket.cpp  -fPIC -DPIC 
-o .libs/libnet6_la-socket.o

src/socket.cpp: In destructor `virtual net6::socket::~socket()':

src/socket.cpp:85: error: `close' undeclared (first use this function)

src/socket.cpp:85: error: (Each undeclared identifier is reported only once for 

   each function it appears in.)

Attachments

build (19.9 kB) - added by anonymous 7 years ago.

Change History

Changed 7 years ago by anonymous

Changed 7 years ago by armin

Maybe an explicit '#include <unistd.h>' is missing. Can you add it to src/socket.cpp and check whether it works?

Changed 7 years ago by anonymous

socket.cpp works, though encrypt.cpp doesn't build now:

if /usr/local/bin/libtool  --tag=CXX --mode=compile c++ -DHAVE_CONFIG_H -I. -I. -I./inc 
-I/usr/local/include/sigc++-2.0 -I/usr/local/lib/sigc++-2.0/include -I/usr/local/include 
-I/usr/local/include -I/usr/local/include -Iinc -DLOCALEDIR=\""/usr/local/share/locale"\" 
-I/usr/local/include  -O2 -pipe -MT libnet6_la-encrypt.lo -MD -MP -MF 
".deps/libnet6_la-encrypt.Tpo" -c -o libnet6_la-encrypt.lo `test -f 'src/encrypt.cpp' || echo 
'./'`src/encrypt.cpp;  then mv -f ".deps/libnet6_la-encrypt.Tpo" ".deps/libnet6_la-encrypt.Plo"; 
else rm -f ".deps/libnet6_la-encrypt.Tpo"; exit 1; fi
rm: : Invalid argument
 c++ -DHAVE_CONFIG_H -I. -I. -I./inc -I/usr/local/include/sigc++-2.0 -I/usr/local/lib/sigc++-2.0/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -Iinc -DLOCALEDIR=\"/usr/local/share/locale\" -I/usr/local/include -O2 -pipe -MT libnet6_la-encrypt.lo -MD -MP -MF .deps/libnet6_la-encrypt.Tpo -c src/encrypt.cpp  -fPIC -DPIC -o .libs/libnet6_la-encrypt.o
src/encrypt.cpp:80: error: syntax error before `,' token
src/encrypt.cpp: In function `ssize_t <unnamed>::net6_unix_send_func(...)':
src/encrypt.cpp:86: error: `ptr' undeclared (first use this function)
src/encrypt.cpp:86: error: (Each undeclared identifier is reported only once 
   for each function it appears in.)
src/encrypt.cpp:87: error: `data' undeclared (first use this function)
src/encrypt.cpp:88: error: `size' undeclared (first use this function)
src/encrypt.cpp: In constructor `
   net6::tcp_encrypted_socket_base::tcp_encrypted_socket_base(int, 
   gnutls_session_int*)':
src/encrypt.cpp:202: error: invalid conversion from `ssize_t (*)(...)' to `
   ssize_t (*)(void*, const void*, long unsigned int)'

Changed 7 years ago by armin

Seems to be the same problem as reported in #153. This is already fixed in the repository and will be included in the next release.

Changed 7 years ago by anonymous

That did the trick. Thanks.

Changed 7 years ago by anonymous

I have another question, namely how to solve this one (libobby 0.4.0rc1 this time):

if /usr/local/bin/libtool  --tag=CXX --mode=compile c++ -DHAVE_CONFIG_H -I. -I. 
-I../inc  -I/usr/local/include/sigc++-2.0 -I/usr/local/lib/sigc++-2.0/include 
-I/usr/local/include -I../inc   -DLOCALEDIR=\""/usr/local/share/locale"\"  
-I/usr/local/include  -O2 -pipe -MT libobby_la-server_document_info.lo -MD -MP -MF 
".deps/libobby_la-server_document_info.Tpo" -c -o libobby_la-server_document_info.lo 
`test -f 'server_document_info.cpp' || echo './'`server_document_info.cpp;  then mv 
-f ".deps/libobby_la-server_document_info.Tpo" 
".deps/libobby_la-server_document_info.Plo"; else rm -f 
".deps/libobby_la-server_document_info.Tpo"; exit 1; fi
rm: : Invalid argument
 c++ -DHAVE_CONFIG_H -I. -I. -I../inc -I/usr/local/include/sigc++-2.0 
-I/usr/local/lib/sigc++-2.0/include -I/usr/local/include -I../inc 
-DLOCALEDIR=\"/usr/local/share/locale\" -I/usr/local/include -O2 -pipe -MT 
libobby_la-server_document_info.lo -MD -MP -MF 
.deps/libobby_la-server_document_info.Tpo -c server_document_info.cpp  -fPIC -DPIC -o
 .libs/libobby_la-server_document_info.o
In file included from server_document_info.cpp:19:
../inc/server_document_info.hpp: In constructor `
   obby::basic_server_document_info<Document,
   Selector>::basic_server_document_info(const
   obby::basic_server_buffer<Document, Selector>&, typename
   obby::basic_server_buffer<Document, Selector>::net_type&, const
   obby::serialise::object&)':
../inc/server_document_info.hpp:272: error: syntax error before `>' token

Changed 7 years ago by armin

This looks strange. You may try to replace <const user*> by <const obby::user*> but it should also work without that...

Changed 7 years ago by anonymous

Without it also doesn't build. GCC 3.3.5 still.

Changed 7 years ago by anonymous

s/without/with/ in my previous comment.

Changed 7 years ago by anonymous

no one?

Changed 7 years ago by armin

Just installed gcc 3.3.5. Please do not ask me why, but it seems that you have to make 'content_attr.serialise::attribute::as' out of 'content_attr.as'. The same applies to author_attr one line below. However, I commit this to the repository.

Changed 7 years ago by anonymous

thanks, I´ll report back asap

Changed 7 years ago by anonymous

I don't get it, what do you mean with "make x out of y"? "change x into y"?

Changed 7 years ago by anonymous mouse

anyway, it continues to build, thanks.

Changed 7 years ago by anonymous

Up until: c++ -dhared -fPIC -DPIC .libs/libobby_la-common.o .libs/libobby_la-format_string.o .libs/libobby_la-error.o .libs/libobby_la-position.o .libs/libobby_la-duplex_signal.o .libs/libobby_la-ring.o .libs/libobby_la-ptr_iterator.o .libs/libobby_la-vector_time.o .libs/libobby_la-colour.o .libs/libobby_la-user.o .libs/libobby_la-user_table.o .libs/libobby_la-command.o .libs/libobby_la-chat.o .libs/libobby_la-text.o .libs/libobby_la-document.o .libs/libobby_la-operation.o .libs/libobby_la-no_operation.o .libs/libobby_la-split_operation.o .libs/libobby_la-insert_operation.o .libs/libobby_la-delete_operation.o .libs/libobby_la-record.o .libs/libobby_la-jupiter_error.o .libs/libobby_la-jupiter_algorithm.o .libs/libobby_la-jupiter_undo.o .libs/libobby_la-jupiter_client.o .libs/libobby_la-jupiter_server.o .libs/libobby_la-document_packet.o .libs/libobby_la-document_info.o .libs/libobby_la-local_document_info.o .libs/libobby_la-client_document_info.o .libs/libobby_la-server_document_info.o .libs/libobby_la-host_document_info.o .libs/libobby_la-buffer.o .libs/libobby_la-local_buffer.o .libs/libobby_la-client_buffer.o .libs/libobby_la-server_buffer.o .libs/libobby_la-host_buffer.o -Wl,--whole-archive serialise/.libs/libserialise.a -Wl,--no-whole-archive -L/usr/local/lib -lsigc-2.0 -lz -liconv -lintl -lgpg-error -lgcrypt -lgnutls -lnet6 -o .libs/libobby-0.4.so.0.0 serialise/.libs/libserialise.a: member serialise/.libs/libserialise.a(libintl.a) in archive is not an object

Changed 7 years ago by armin

Please try the recently released obby-0.4rc2 that should fix several build problems mentioned here. If that linker problem remains, send us a complete build log including the config.log file.

Changed 7 years ago by kryptos

The linker problem still remains. The logs are here http://home.nedlinux.nl/~kryptos/obby/

The problem may be here: checking how to link with libiconv... /usr/local/lib/libiconv.a checking how to link with libintl... /usr/local/lib/libintl.a /usr/local/lib/libiconv.a

which ends up a compile time like: /usr/local/bin/libtool --tag=CXX --mode=link c++ -O2 -pipe -o libserialise.la libserialise_la-error.lo libserialise_la-token.lo libserialise_la-attribute.lo libserialise_la-object.lo libserialise_la-parser.lo -L/usr/local/lib -lnet6 -lgnutls -lgcrypt -lgpg-error -lintl -liconv -lz -lsigc-2.0 /usr/local/lib/libintl.a /usr/local/lib/libiconv.a

An error is spawned like: *** Warning: Trying to link with static lib archive /usr/local/lib/libiconv.a.

*** I have the capability to make that library automatically link in when

*** you link to this library. But I can only do this if you have a

*** shared version of the library, which you do not appear to have

*** because the file extensions .a of this argument makes me believe

*** that it is just a static archive that I should not used here.

*** Warning: Trying to link with static lib archive /usr/local/lib/libintl.a.

*** I have the capability to make that library automatically link in when

*** you link to this library. But I can only do this if you have a

*** shared version of the library, which you do not appear to have

*** because the file extensions .a of this argument makes me believe

*** that it is just a static archive that I should not used here.

Hope this helps.

Changed 7 years ago by phil

Doesn't OpenBSD support shared libraries or why is there only an archive file for libiconv?

Changed 7 years ago by phil

You could please try if forcing LDFLAGS to "-lintl -liconv" helps? That's just a random guess. And please try googling around for this issue. It is not specific to obby. I just found a mailing list post[1] about it, but without any suggestion how to change the Autotools macros to support OpenBSD's libtool properly.

Oh well... some research later I found out that I am right: Just read [2] and apply the fix. It should help you with your problem. And thanks for your efforts to get it into OpenBSD's ports collection.

[1] http://archives.neohapsis.com/archives/openbsd/2006-04/1177.html [2] http://www.mail-archive.com/ports@openbsd.org/msg05056.html

Changed 7 years ago by anonymous

still a no go: http://home.nedlinux.nl/~kryptos/obby/build.log2 Though one warning has been silinced...

Changed 7 years ago by anonymous

though I have to say there is a shared libray of libintl.

Changed 7 years ago by phil

Ew I expected you to apply this also to the other library.

Changed 7 years ago by phil

  • status changed from new to closed
  • priority changed from high to normal
  • resolution set to fixed

Resolving now, two weeks of no reply and a semi-clear instruction set what to do to fix this OpenBSD problem.

Note: See TracTickets for help on using tickets.