Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 383083 - net-ftp/lftp-4.3.1: Failed compiling on Solaris 2.10 using sockets
Summary: net-ftp/lftp-4.3.1: Failed compiling on Solaris 2.10 using sockets
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Solaris
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-15 12:37 UTC by Hector Rivas
Modified: 2011-09-19 14:19 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Proposed patch (lftp-solaris-2.10-socket.patch,2.15 KB, patch)
2011-09-15 12:39 UTC, Hector Rivas
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hector Rivas 2011-09-15 12:37:12 UTC
The lftp packages does not compile on Solaris. The file src/attach.h has to be modified to:
 * include sys/un.h
 * Add the macron SUN_LEN (defined in Linux, not Solaris)
 * rename the variable sun to s_un


Reproducible: Always

Steps to Reproduce:
try to compile lftp in Solaris
Actual Results:  
sparc-sun-solaris2.10-g++ -DHAVE_CONFIG_H -I. -I../lib -I../lib -I../trio -I/apps/murex/local/SunOS-sparc/gentoo/usr/include   -I/apps/murex/local/SunOS-sparc/gentoo/usr/include  -Wall -Wwrite-strings -Woverloaded-virtual -fno-exceptions -fno-rtti -fno-implement-inlines -MT lftp.o -MD -MP -MF .deps/lftp.Tpo -c -o lftp.o lftp.cc
In file included from lftp.cc:53:
attach.h: In member function 'virtual int AcceptTermFD::Do()':
attach.h:91: error: expected unqualified-id before numeric constant
attach.h:93: error: lvalue required as unary '&' operand
attach.h: In member function 'void AcceptTermFD::do_listen()':
attach.h:164: error: expected unqualified-id before numeric constant
attach.h:165: error: lvalue required as unary '&' operand
attach.h:166: error: request for member 'sun_family' in '1', which is of non-class type 'int'
attach.h:167: error: request for member 'sun_path' in '1', which is of non-class type 'int'
attach.h:167: error: request for member 'sun_path' in '1', which is of non-class type 'int'
attach.h:168: error: lvalue required as unary '&' operand
attach.h:168: error: lvalue required as unary '&' operand
attach.h:168: error: 'SUN_LEN' was not declared in this scope
attach.h: In member function 'virtual int SendTermFD::Do()':
attach.h:222: error: expected unqualified-id before numeric constant
attach.h:223: error: lvalue required as unary '&' operand
attach.h:224: error: request for member 'sun_family' in '1', which is of non-class type 'int'
attach.h:226: error: request for member 'sun_path' in '1', which is of non-class type 'int'
attach.h:226: error: request for member 'sun_path' in '1', which is of non-class type 'int'
attach.h:227: error: lvalue required as unary '&' operand
attach.h:227: error: lvalue required as unary '&' operand
attach.h:227: error: 'SUN_LEN' was not declared in this scope
make[1]: *** [lftp.o] Error 1
make[1]: Leaving directory `/tmp/portage/net-ftp/lftp-4.3.1/work/lftp-4.3.1/src'
make: *** [all-recursive] Error 1
emake failed
 * ERROR: net-ftp/lftp-4.3.1 failed (compile phase):
 *   emake failed
 *
 * Call stack:
 *     ebuild.sh, line   62:  Called call-ebuildshell 'src_compile'
 *   environment, line  506:  Called src_compile
 *   environment, line 2840:  Called _eapi2_src_compile
 *     ebuild.sh, line  673:  Called die
 * The specific snippet of code:
 *            emake || die "emake failed"
 *
 * If you need support, post the output of 'emerge --info =net-ftp/lftp-4.3.1',
 * the complete build log and the output of 'emerge -pqv =net-ftp/lftp-4.3.1'.
 * The complete build log is located at '/tmp/portage/net-ftp/lftp-4.3.1/temp/build.log'.
 * The ebuild environment file is located at '/tmp/portage/net-ftp/lftp-4.3.1/temp/environment'.
 * S: '/tmp/portage/net-ftp/lftp-4.3.1/work/lftp-4.3.1'

>>> Failed to emerge net-ftp/lftp-4.3.1, Log file:

>>>  '/tmp/portage/net-ftp/lftp-4.3.1/temp/build.log'

 * Messages for package net-ftp/lftp-4.3.1:

 * ERROR: net-ftp/lftp-4.3.1 failed (compile phase):
 *   emake failed
 *
 * Call stack:
 *     ebuild.sh, line   62:  Called call-ebuildshell 'src_compile'
 *   environment, line  506:  Called src_compile
 *   environment, line 2840:  Called _eapi2_src_compile
 *     ebuild.sh, line  673:  Called die
 * The specific snippet of code:
 *             emake || die "emake failed"
 *
 * If you need support, post the output of 'emerge --info =net-ftp/lftp-4.3.1',
 * the complete build log and the output of 'emerge -pqv =net-ftp/lftp-4.3.1'.
 * The complete build log is located at '/tmp/portage/net-ftp/lftp-4.3.1/temp/build.log'.
 * The ebuild environment file is located at '/tmp/portage/net-ftp/lftp-4.3.1/temp/environment'.
 * S: '/tmp/portage/net-ftp/lftp-4.3.1/work/lftp-4.3.1'



I think is a problem in upstream, I sent them the patch.

Patch not fully tested in all platforms, but it should work.
Comment 1 Hector Rivas 2011-09-15 12:39:20 UTC
Created attachment 286547 [details, diff]
Proposed patch

Added a include to sys/un.h, a definition of the macro SUN_LEN and renamed the variable sun to s_un
Comment 2 Hector Rivas 2011-09-16 13:30:31 UTC
Version 4.3.2 fixes the problem (same solution)

See https://github.com/lavv17/lftp/blob/master/src/attach.h
Comment 3 Fabian Groffen gentoo-dev 2011-09-19 14:19:21 UTC
*lftp-4.3.2 (16 Sep 2011)

  16 Sep 2011; Jeroen Roovers <jer@gentoo.org> +lftp-4.3.2.ebuild:
  Version bump.


So I think this issue should be fixed then