pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/41334: libtorrent failed to compile on Solaris 10



>Number:         41334
>Category:       pkg
>Synopsis:       libtorrent failed to compile on Solaris 10
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat May 02 09:05:00 +0000 2009
>Originator:     Stephan Pietzko
>Release:        pkgsrc-2009Q1 (30. Apr. 2009)
>Organization:
University of Konstanz
>Environment:
SunOS host 5.10 Generic_138888-08 sun4u sparc SUNW,A70
>Description:
pkgsrc/net/libtorrent failed to compile on Solaris 10 (latest patch till Apr 
09) with Sun gcc with:

[...]
nclude -DNDEBUG -I/usr/pkg/include   -I/usr/pkg/include/sigc++-2.0 
-I/usr/pkg/lib/sigc++-2.0/include   -MT memory_chunk.lo -MD -MP -MF 
.deps/memory_chunk.Tpo -c -o memory_chunk.lo memory_chunk.cc
 g++ -DHAVE_CONFIG_H -I. -I../.. -I./.. 
-I/usr/pkgsrc/net/libtorrent/work/.buildlink/include -O -DNDEBUG 
-I/usr/pkgsrc/net/libtorrent/work/.buildlink/include/sigc++-2.0 
-I/usr/pkgsrc/net/libtorrent/work/.buildlink/lib/sigc++-2.0/include -MT 
memory_chunk.lo -MD -MP -MF .deps/memory_chunk.Tpo -c memory_chunk.cc  -fPIC 
-DPIC -o .libs/memory_chunk.o
memory_chunk.cc: In member function `bool 
torrent::MemoryChunk::advise(uint32_t, uint32_t, int)':
memory_chunk.cc:124: error: `madvise' undeclared (first use this function)
memory_chunk.cc:124: error: (Each undeclared identifier is reported only once 
for each function it appears in.)
gmake[3]: *** [memory_chunk.lo] Error 1
gmake[3]: Leaving directory 
`/usr/pkgsrc/net/libtorrent/work/libtorrent-0.12.2/src/data'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory 
`/usr/pkgsrc/net/libtorrent/work/libtorrent-0.12.2/src'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/pkgsrc/net/libtorrent/work/libtorrent-0.12.2'
gmake: *** [all] Error 2
*** Error code 2

Stop.
bmake: stopped in /usr/pkgsrc/net/libtorrent
*** Error code 1

>How-To-Repeat:
Install Solaris 10 (patched till Apr 09) and pkgsrc-2009Q1 (version from 30. 
Apr) with no special options:

PATH=/usr/pkg/bin:/usr/pkg/sbin:/usr/sbin:/usr/bin:/opt/SUNWspro/bin:/usr/dt/bin:/usr/openwin/bin:/usr/ccs/bin:/usr/ccs/lib:/usr/sfw/bin:/usr/sfw/sbin

> cd /usr/pkgsrc/bootstrap
> ./bootstrap
> cd /usr/pkgsrc/net/libtorrent
> bmake

I think same problem exists since several releases of Solaris and pkgsrc.
>Fix:
Fix described on:
http://libtorrent.rakshasa.no/ticket/1003
and
http://libtorrent.rakshasa.no/ticket/1645

a similar problem exists with rtorrent (see my next bugreport).

/usr/pkgsrc/net/libtorrent> diff -c 
work/libtorrent-0.12.2/src/data/memory_chunk.cc 
/usr/local/src/pkgsrc/libtorrent/work/libtorrent-0.12.2/src/data/memory_chunk.cc
*** work/libtorrent-0.12.2/src/data/memory_chunk.cc     Sat May  2 11:57:41 2009
--- 
/usr/local/src/pkgsrc/libtorrent/work/libtorrent-0.12.2/src/data/memory_chunk.cc
    Sat May  2 10:35:32 2009
***************
*** 46,51 ****
--- 46,53 ----
  #include "torrent/exceptions.h"
  #include "memory_chunk.h"
  
+ extern "C" int madvise(void *, size_t, int);
+ 
  namespace torrent {
  
  uint32_t MemoryChunk::m_pagesize = getpagesize();



Home | Main Index | Thread Index | Old Index