[Roadster] Issues compiling Roadster on Mac OS X: mainwindow.c throws "parameter name omitted" errors

Matthew Vaughn matt.vaughn at gmail.com
Sun Feb 12 15:03:29 PST 2006


Dear Ian and Jeff,

I just got around to trying Jeff's patch. It worked, and I think the  
basic compile went OK. However, the overall build failed in the libs  
section with a load of linker errors. It looks to me like libraries  
in /usr/lib are over-riding the ones I built in /opt/local/lib  
despite the fact that I never specified to use /usr/lib at all. I  
haven't had much time to try and work around this, but a quick  
perusal of google suggests that this is a common issue with the  
Darwin linker.

Cheers,

Matt

mkdir .libs
gcc -g -O2 -Wall -o roadster main.o db.o downloadmanager.o  
directionswindow.o gui.o mainwindow.o gotowindow.o map.o  
mapinfowindow.o map_draw_cairo.o map_draw_gdk.o map_history.o  
map_hittest.o map_math.o map_style.o map_tilemanager.o import.o  
import_tiger.o importwindow.o util.o gpsclient.o location.o  
locationset.o locationeditwindow.o searchwindow.o search_road.o  
search_location.o search_city.o search_coordinate.o search.o  
scenemanager.o glyph.o road.o animator.o tooltipwindow.o test_poly.o   
-L/opt/local/lib -L/usr/X11R6/lib /opt/local/lib/libgnomeui-2.dylib / 
opt/local/lib/libbonoboui-2.dylib -lSM -lICE /opt/local/lib/libgnome- 
keyring.dylib /opt/local/lib/libgnomecanvas-2.dylib /opt/local/lib/ 
libgnome-2.dylib /opt/local/lib/libesd.dylib /opt/local/lib/ 
libaudiofile.dylib /opt/local/lib/libart_lgpl_2.dylib /opt/local/lib/ 
libgnomevfs-2.dylib -lssl -lcrypto /opt/local/lib/libbonobo-2.dylib / 
opt/local/lib/libgconf-2.dylib /opt/local/lib/libbonobo- 
activation.dylib /opt/local/lib/libORBitCosNaming-2.dylib /opt/local/ 
lib/libORBit-2.dylib /opt/local/lib/libpopt.dylib -lresolv /opt/local/ 
lib/libgthread-2.0.dylib /opt/local/lib/libglade-2.0.dylib -ldl /opt/ 
local/lib/libgtk-x11-2.0.dylib /opt/local/lib/libgdk-x11-2.0.dylib / 
opt/local/lib/libatk-1.0.dylib /opt/local/lib/ 
libgdk_pixbuf-2.0.dylib /opt/local/lib/libtiff.dylib /opt/local/lib/ 
libjpeg.dylib /opt/local/lib/libpangocairo-1.0.dylib /opt/local/lib/ 
libpangoft2-1.0.dylib /opt/local/lib/libpango-1.0.dylib /opt/local/ 
lib/libgobject-2.0.dylib /opt/local/lib/libgmodule-2.0.dylib /opt/ 
local/lib/libglib-2.0.dylib /opt/local/lib/libintl.dylib /opt/local/ 
lib/libxml2.dylib /usr/lib/libiconv.dylib /opt/local/lib/ 
libiconv.dylib /opt/local/lib/libcairo.dylib /opt/local/lib/ 
libfontconfig.dylib /opt/local/lib/libfreetype.dylib /opt/local/lib/ 
libexpat.dylib /opt/local/lib/libXrender.dylib -lX11 -lpng12 -L/opt/ 
local/mysql/lib/mysql -lmysqld -lz -lsupc++ /opt/local/lib/ 
libgps.dylib -lm -lc -lpthread
ld: warning multiple definitions of symbol _locale_charset
/opt/local/lib/libintl.dylib(localcharset.o) definition of  
_locale_charset
/opt/local/lib/libiconv.dylib(localcharset.o) definition of  
_locale_charset
ld: warning multiple definitions of symbol _hash_search
/opt/local/mysql/lib/mysql/libmysqld.a(hash.o) definition of  
_hash_search in section (__TEXT,__text)
/usr/lib/libdl.dylib(strhash.So) definition of _hash_search
ld: multiple definitions of symbol _hash_create
/usr/lib/libdl.dylib(strhash.So) definition of _hash_create
/opt/local/mysql/lib/mysql/libmysqld.a(hash0hash.o) definition of  
_hash_create in section (__TEXT,__text)
ld: warning suggest use of -bind_at_load, as lazy binding may result  
in errors or different symbols being used
symbol __libiconv_version used from dynamic library /opt/local/lib/ 
libiconv.dylib(iconv.o) not from earlier dynamic library /usr/lib/ 
libiconv.2.dylib(iconv.o)
symbol _aliases_lookup used from dynamic library /opt/local/lib/ 
libiconv.dylib(iconv.o) not from earlier dynamic library /usr/lib/ 
libiconv.2.dylib(iconv.o)
symbol _libiconv used from dynamic library /opt/local/lib/ 
libiconv.dylib(iconv.o) not from earlier dynamic library /usr/lib/ 
libiconv.2.dylib(iconv.o)
symbol _libiconv_close used from dynamic library /opt/local/lib/ 
libiconv.dylib(iconv.o) not from earlier dynamic library /usr/lib/ 
libiconv.2.dylib(iconv.o)
symbol _libiconv_open used from dynamic library /opt/local/lib/ 
libiconv.dylib(iconv.o) not from earlier dynamic library /usr/lib/ 
libiconv.2.dylib(iconv.o)
symbol _libiconvctl used from dynamic library /opt/local/lib/ 
libiconv.dylib(iconv.o) not from earlier dynamic library /usr/lib/ 
libiconv.2.dylib(iconv.o)
symbol _libiconvlist used from dynamic library /opt/local/lib/ 
libiconv.dylib(iconv.o) not from earlier dynamic library /usr/lib/ 
libiconv.2.dylib(iconv.o)
symbol _libiconv_relocate used from dynamic library /opt/local/lib/ 
libiconv.dylib(relocatable.o) not from earlier dynamic library /usr/ 
lib/libiconv.2.dylib(relocatable.o)
symbol _libiconv_set_relocation_prefix used from dynamic library /opt/ 
local/lib/libiconv.dylib(relocatable.o) not from earlier dynamic  
library /usr/lib/libiconv.2.dylib(relocatable.o)
make[2]: *** [roadster] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2



On Feb 12, 2006, at 4:18 PM, Ian McIntosh wrote:

> Jeff,
>
> Have you successfully compiled Roadster on OSX?
>
> -Ian
>
> El vie, 10-02-2006 a las 06:45 -0600, Jeff Garrett escribió:
>>> Now, the big Lebowsky.. "make"
>>>
>>> make > make.log &
>>>
>>> The process goes on for a minute or so then dies in mainwindow.c  
>>> with
>>> the following trainwreck of errors:
>>>
>>> mainwindow.c: In function
>>> 'mainwindow_locationset_list_is_separator_callback':
>>> mainwindow.c:506: error: parameter name omitted
>>> mainwindow.c: In function 'mainwindow_on_window_state_change':
>>> mainwindow.c:1391: error: parameter name omitted
>>> mainwindow.c: In function 'mainwindow_on_expose_event':
>>> mainwindow.c:1513: error: parameter name omitted
>>> mainwindow.c: In function 'mainwindow_on_gps_show_position_toggled':
>>> mainwindow.c:1534: error: parameter name omitted
>> [and more of the same...]
>>
>>> Dropping back to gcc 3.3 doesn't solve the problem. Since nobody
>>> building on Linux has reported this, my guess is (without looking
>>> carefully at the code) that there that Apple's gcc4 doesn't like
>>> what's being done here. Any suggestions about how to get around  
>>> these
>>> errors?
>>
>> Each of those functions has a parameter called __unused.  On  
>> Linux, by
>> happenstance this name isn't being used by anything (even though it's
>> reserved).  On Darwin, in sys/cdefs.h it is defined to be a certain
>> GCC-specific construction and thus can't serve as the parameter name.
>>
>> Try applying the attached patch.  It renames all the identifiers I  
>> could
>> find in live code starting with __.
>>
>> _______________________________________________
>> roadster mailing list
>> roadster at cairographics.org
>> http://lists.freedesktop.org/mailman/listinfo/roadster
>
> _______________________________________________
> roadster mailing list
> roadster at cairographics.org
> http://lists.freedesktop.org/mailman/listinfo/roadster



More information about the roadster mailing list