pkgsrc-Bugs archive

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

pkg/37360: lang/erlang doesn't compile on -current

>Number:         37360
>Category:       pkg
>Synopsis:       lang/erlang doesn't compile on -current
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Nov 11 21:15:01 +0000 2007
>Originator:     A. Degroote
>Release:        current
NetBSD 4.99.35 NetBSD 4.99.35 (AMILO) #9: Sat Nov 10 10:47:57 CET 

The build of lang/erlang failed with the following error :

cc    -I/usr/include 
-I/usr/include  -DHYBRID -DHAVE_CONFIG_H -Wall -Wstrict-prototypes 
-Wmissing-prototypes   -Ibeam -Isys/unix -Isys/common 
-Ii386--netbsdelf/opt/hybrid -Ii386--netbsdelf -Izlib -Ihipe 
-I../include/internal -I../include/internal/i386--netbsdelf -c 
sys/common/erl_mseg.c -o obj/i386--netbsdelf/opt/hybrid/erl_mseg.o
sys/common/erl_mseg.c: In function 'mseg_recreate':
sys/common/erl_mseg.c:375: error: 'MREMAP_MAYMOVE' undeclared (first use in 
this function)
sys/common/erl_mseg.c:375: error: (Each undeclared identifier is reported only 
sys/common/erl_mseg.c:375: error: for each function it appears in.)
sys/common/erl_mseg.c:375: warning: passing argument 3 of 'mremap' makes 
pointer from integer without a cast
sys/common/erl_mseg.c:375: error: too few arguments to function 'mremap'

It is due to different prototype between GNU/Linux mremap and our 
cd /usr/pkgsrc/lang/erlang; make;
The following patch permit to compile on NetBSD but need more attention for 
other system.


--- erts/emulator/sys/common/erl_mseg.c.orig    2007-11-11 14:24:18.00000000
00 +0100
+++ erts/emulator/sys/common/erl_mseg.c
@@ -371,8 +371,9 @@ mseg_recreate(void *old_seg, Uint old_si
     new_seg = (void *) mremap((void *) old_seg,
                              (size_t) old_size,
+                             (void *) new_seg,
                              (size_t) new_size,
-                             MREMAP_MAYMOVE);
+                             0);
     if (new_seg == (void *) MAP_FAILED)
        new_seg = NULL;

Home | Main Index | Thread Index | Old Index