Bug 122236 - Can't specify C++ build for dev-lisp/ecls and dev-lisp/ecls-cvs
Bug#: 122236 Product:  Gentoo Linux Version: 2005.1 Platform: All
OS/Version: Linux Status: VERIFIED Severity: enhancement Priority: P2
Resolution: FIXED Assigned To: common-lisp@gentoo.org Reported By: ivan@toshkov.org
Component: Development
URL: 
Summary: Can't specify C++ build for dev-lisp/ecls and dev-lisp/ecls-cvs
Keywords:  
Status Whiteboard: 
Opened: 2006-02-09 04:12 0000
Description:   Opened: 2006-02-09 04:12 0000
Add support for the --with-cxx configure option.  Probably the 'c++' USE can be
reused here, because it is obeyed in boehm-gc. (At least in versions 6.3 and
6.4. It seems to be dropped in the latter...)

------- Comment #1 From Matthew Kennedy (RETIRED) 2006-02-13 11:41:38 0000 -------
ok. seems like a reasonable request.

------- Comment #2 From Matthew Kennedy (RETIRED) 2006-02-13 11:48:15 0000 -------
Ran into some problems with the sockets support:

/var/tmp/portage/ecls-0.9h-r1/work/ecl-0.9h/build/ext/sockets.c: In function
`cl_lispunion* LC30socket_accept(cl_lispunion*)':
/var/tmp/portage/ecls-0.9h-r1/work/ecl-0.9h/build/ext/sockets.c:892: error:
invalid conversion from `int*' to `socklen_t*'
/var/tmp/portage/ecls-0.9h-r1/work/ecl-0.9h/build/ext/sockets.c:892: error:  
initializing argument 3 of `int accept(int, sockaddr*, socklen_t*)'
...

------- Comment #3 From Ivan Toshkov 2006-02-13 14:03:43 0000 -------
(In reply to comment #2)
> Ran into some problems with the sockets support:
> 
> /var/tmp/portage/ecls-0.9h-r1/work/ecl-0.9h/build/ext/sockets.c: In function
> `cl_lispunion* LC30socket_accept(cl_lispunion*)':
> /var/tmp/portage/ecls-0.9h-r1/work/ecl-0.9h/build/ext/sockets.c:892: error:
> invalid conversion from `int*' to `socklen_t*'
> /var/tmp/portage/ecls-0.9h-r1/work/ecl-0.9h/build/ext/sockets.c:892: error:  
> initializing argument 3 of `int accept(int, sockaddr*, socklen_t*)'
> ...
> 

Same here.  I tried both with GCC 3.3.6 and GCC 3.4.4.  The problem seems to be
in the socket code only, 'cause when I managed to compile it without
--with-tcp.

------- Comment #4 From Ivan Toshkov 2006-02-13 14:49:50 0000 -------
Created an attachment (id=79725) [details]
untested patch

This is an untested patch against the CVS HEAD.  But since it is in a contrib
file, I'd guess it hadn't changed for some time.

------- Comment #5 From Matthew Kennedy (RETIRED) 2006-02-14 10:25:41 0000 -------
It looks like the local socket interface in ECL hasn't been tested with the
--with-cxx configuration.  Attached is a patch which should fix the build
errors.  I will try to send it up stream if it also works for you.

------- Comment #6 From Matthew Kennedy (RETIRED) 2006-02-14 10:27:38 0000 -------
Created an attachment (id=79781) [details]
0.9h-sockets-c++-gentoo.patch

This diff against ecl-0.9h also includes changes to sockets.lisp from CVS HEAD
(of which there were few changes).

------- Comment #7 From Matthew Kennedy (RETIRED) 2006-02-14 15:03:21 0000 -------
0.9h-r1 understands a c++ USE flag which will cause ECL to be built with the
c++ compiler.

------- Comment #8 From Ivan Toshkov 2006-02-14 16:23:24 0000 -------
Looks like it works.  I don't have test code for sockets, though, so all I can
say is, that it compiles.

Thank you.

------- Comment #9 From Ivan Toshkov 2006-02-14 22:16:31 0000 -------
Created an attachment (id=79820) [details]
ecls file list

This is the result of running "equery files ecls".  Is it normal?

------- Comment #10 From Matthew Kennedy (RETIRED) 2006-02-15 13:48:18 0000 -------
That is odd, but I can offer a theory --

  15 Feb 2006; Matthew Kennedy <mkennedy@gentoo.org>
  files/0.9h-sockets-c++-gentoo.patch:
  Fixed a problem where CVS keywords in patch get changed by repoman commit
  which caused the patch to fail to apply.

Although I didn't experience such an equery files result, perhaps you emerged
ecl while that problem existed in portage.  Try emerge sync and then re-emerge
ecl.  Does the equery files output persist?