[mapserver-users] undefined reference to `__sync_sub_and_fetch_4'

Thiago Tiedtke dos Reis tiedtke at gmail.com
Thu Oct 18 08:21:19 PDT 2012


Hi,

In my case (Msys/Mingw under Windows 7 32bit), no error was presented, and
the object a.exe was generated.

My env:

Tiedtke at Tiedtke-Note ~
$ gcc -v
Using built-in specs.
COLLECT_GCC=C:\MinGW\bin\gcc.exe
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.7.0/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.7.0/configure
--enable-languages=c,c++,ada,fortran,obj
c,obj-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared
--enable-libgo
mp --disable-win32-registry --enable-libstdcxx-debug
--disable-build-poststage1-
with-cxx --enable-version-specific-runtime-libs --build=mingw32
--prefix=/mingw
Thread model: win32
gcc version 4.7.0 (GCC)

Regards,

Tiedtke


2012/10/18 Umberto Nicoletti <umberto.nicoletti at gmail.com>

> Could you try to compile the following code:
>
> /* begin */
> int
> main ()
> {
> int x;__sync_fetch_and_add(&x,1);
>   ;
>   return 0;
> }
> /* end */
>
> How to compile: save to test.c and then run:
>
> gcc test.c
>
> Best regards,
> Umberto
>
> On Thu, Oct 18, 2012 at 1:01 PM, Thiago Tiedtke dos Reis <
> tiedtke at gmail.com> wrote:
>
>> Hi,
>>
>> I having the same problem when trying to compile the mapserver with
>> msys/mingw under Ms windows 7 32bit.
>>
>> Regards,
>>
>> Thiago Tiedtke dos Reis
>> Em 17/10/2012 14:32, "Umberto Nicoletti" <umberto.nicoletti at gmail.com>
>> escreveu:
>>
>>  David,
>>> what is your os/platform?
>>>
>>> On Oct 17, 2012 6:30 PM, "David Quinn" <daithiquinn at gmail.com> wrote:
>>> >
>>> > Hello List,
>>> >
>>> > I'm getting the following error when I try to compile
>>> mapserver-6.2.0-rc1
>>> >
>>> > $make
>>> > /bin/sh ./libtool --mode=link --tag=CXX g++ -rpath /home/david/lib
>>> > shp2img.lo libmapserver.la -o shp2img
>>> > libtool: link: g++ .libs/shp2img.o -o .libs/shp2img
>>> > ./.libs/libmapserver.so -L/home/david/lib /home/david/lib/libgd.so
>>> > -L/usr/lib /home/david/lib/libproj.so /home/david/lib/libgdal.so
>>> > -L/home/david -L/usr/kerberos/lib /usr/lib/libexpat.so
>>> > /home/david/lib/libgif.so /home/david/lib/libcurl.so
>>> > /home/david/lib/libgeos_c.so /home/david/lib/libgeos.so
>>> > /home/david/lib/libxml2.so /home/david/lib/libfreetype.so
>>> > -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lcairo -lXpm -lfontconfig
>>> > -lpng12 -lsqlite3 -lodbc -lodbcinst -ljpeg -lpng -lpq -lpthread -lSM
>>> > -lICE -lX11 -lidn -lldap -lrt -lssl -lcrypto -ldl -lz -lbz2 -Wl,-rpath
>>> > -Wl,/home/david/lib
>>> > ./.libs/libmapserver.so: undefined reference to
>>> `__sync_sub_and_fetch_4'
>>> > collect2: ld returned 1 exit status
>>> > make: *** [shp2img] Error 1
>>> >
>>> > I originally got this error message: /usr/bin/ld: warning:
>>> > libcurl.so.3, needed by /home/david/lib/libgdal.so, may conflict with
>>> > libcurl.so.4 so I installed gdal from trunk, and reinstalled freetype,
>>> > giflib and libcurl
>>> >
>>> > I've also attached the output from my ./configure command:
>>> >
>>> >
>>> > -------------- Compiler Info -------------
>>> >   C compiler:                gcc -g    -Wall
>>> -Wdeclaration-after-statement
>>> >   C++ compiler:              g++ -g    -Wall
>>> >   Debug:                     -g
>>> >   Generic NINT:
>>> >
>>> >  -------------- Renderer Settings ---------
>>> >   OpenGL support:
>>> >   zlib support:
>>> >   png support:               -DUSE_PNG
>>> >   gif support:               -DUSE_GIF
>>> >   jpeg support:              -DUSE_JPEG
>>> >   freetype support:          -DUSE_FREETYPE
>>> >   iconv support:             -DUSE_ICONV
>>> >   AGG support:               internal
>>> >   GD support:                -DUSE_GD  -DUSE_GD_PNG -DUSE_GD_JPEG
>>> -DUSE_GD_GIF
>>> >   Cairo (SVG,PDF) support:   -DUSE_CAIRO
>>> >   Cairo SVG symbol support:
>>> >   KML support:               -DUSE_KML
>>> >
>>> >  -------------- Support Libraries ---------
>>> >   Proj.4 support:            -DUSE_PROJ
>>> >   Proj Fastpaths:
>>> >   Libxml2 support:           -DUSE_LIBXML2
>>> >   FriBidi support:
>>> >   Curl support:              -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH
>>> >   FastCGI support:
>>> >   Exempi support:
>>> >   Threading support:
>>> >   GEOS support:              -DUSE_GEOS
>>> >   XML Mapfile support:
>>> >   XSLT support:
>>> >   EXSLT support:
>>> >
>>> >  -------------- Data Format Drivers -------
>>> >   PostGIS support:           -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION
>>> >   ArcSDE support:
>>> >   OGR support:               -DUSE_OGR
>>> >   GDAL support:              -DUSE_GDAL
>>> >   Oracle Spatial support:
>>> >
>>> >  -------------- OGC Services --------------
>>> >   WMS Server:                -DUSE_WMS_SVR
>>> >   WMS Client:                -DUSE_WMS_LYR
>>> >   WFS Server:                -DUSE_WFS_SVR
>>> >   WFS Client:                -DUSE_WFS_LYR
>>> >   WCS Server:                -DUSE_WCS_SVR
>>> >   SOS Server:
>>> >
>>> >  -------------- MapScript -----------------
>>> >   PHP MapScript:             yes
>>> >   Python MapScript:          no
>>> >
>>> > -David
>>> > _______________________________________________
>>> > mapserver-users mailing list
>>> > mapserver-users at lists.osgeo.org
>>> > http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>
>>> _______________________________________________
>>> mapserver-users mailing list
>>> mapserver-users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>
>>>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20121018/1942041f/attachment.htm>


More information about the MapServer-users mailing list