gnupic: Thread: gpsim compiler preference?


[<<] [<] Page 1 of 1 [>] [>>]
Subject: gpsim compiler preference?
From: Mikey Sklar ####@####.####
Date: 25 Jan 2004 23:44:56 -0000
Message-Id: <Pine.LNX.4.50.0401251507480.15748-100000@b7.d13.com>

Is there a recommended gcc revision for gpsim 0.21.1? I am able to
build gpsim almost entire with 2.95.2. It just stops with one type error
in icd.cc.

Using gcc 3.1 and 3.3 I get invalid type warnings from intcon.cc which 
cascade into more errors further down. I assume this to just be gcc being  
more finiky with the 3.x revs. I am using panther 10.3.2.

/bin/sh ../libtool --mode=compile c++ -DHAVE_CONFIG_H -I. -I. -I.. 
-I/sw/include/gtk-1.2 -I/sw/include/glib-1.2 -I/sw/lib/glib/include 
-I/usr/X11R6/include  -I/sw/include  -g -O3 -c intcon.cc
c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/sw/include/gtk-1.2 
-I/sw/include/glib-1.2 -I/sw/lib/glib/include -I/usr/X11R6/include 
-I/sw/include -g -O3 -c intcon.cc -o intcon.o
In file included from breakpoints.h:25,
                 from pic-registers.h:52,
                 from intcon.h:27,
                 from intcon.cc:26:
pic-instructions.h:131: warning: invalid type `void*' for default argument 
to `
   pic_processor*'
In file included from pic-registers.h:52,
                 from intcon.h:27,
                 from intcon.cc:26:
breakpoints.h:177: warning: invalid type `void*' for default argument to `
   BreakCallBack*'
breakpoints.h:172: warning: invalid type `void*' for default argument to `
   BreakCallBack*'
breakpoints.h:171: warning: invalid type `void*' for default argument to `
   BreakCallBack*'
breakpoints.h:168: warning: invalid type `void*' for default argument to `
   BreakCallBack*'
breakpoints.h: In constructor `Notify_Register::Notify_Register()':
breakpoints.h:245: warning: invalid conversion from `void*' to 
`file_register*'
breakpoints.h:245: warning: invalid conversion from `void*' to `
   Notify_Register*'
breakpoints.h: In constructor 
`Notify_Register_Value::Notify_Register_Value()':
breakpoints.h:309: warning: invalid conversion from `void*' to 
`file_register*'
breakpoints.h: In constructor `InterfaceObject::InterfaceObject()':
breakpoints.h:463: warning: invalid conversion from `void*' to 
`Processor*'
In file included from intcon.h:29,
                 from intcon.cc:26:
trace.h: At global scope:
trace.h:218: warning: invalid type `void*' for default argument to `FILE*'
trace.h:255: warning: invalid type `void*' for default argument to `char*'
In file included from pic-processor.h:27,
                 from 16bit-registers.h:31,
                 from intcon.cc:28:
modules.h: In member function `virtual char* Module::get_pin_name(unsigned
   int)':
modules.h:116: warning: invalid conversion from `void*' to `char*'
modules.h: In member function `virtual IOPIN* Module::get_pin(unsigned 
int)':
modules.h:118: warning: invalid conversion from `void*' to `IOPIN*'
modules.h: At global scope:
modules.h:191: default argument for `char*module_new_name' has type 
`void*'
In file included from processor.h:30,
                 from pic-processor.h:28,
                 from 16bit-registers.h:31,
                 from intcon.cc:28:
gpsim_time.h:165: warning: invalid type `void*' for default argument to `
   BreakCallBack*'
gpsim_time.h:164: warning: invalid type `void*' for default argument to `
   BreakCallBack*'
gpsim_time.h:162: warning: invalid type `void*' for default argument to `
   BreakCallBack*'
In file included from pic-processor.h:28,
                 from 16bit-registers.h:31,
                 from intcon.cc:28:
processor.h:282: warning: invalid type `void*' for default argument to 
`char*'
processor.h:283: warning: invalid type `void*' for default argument to 
`char*'
In file included from pic-packages.h:35,
In file included from 16bit-registers.h:31,
                 from intcon.cc:28:
pic-processor.h:247: warning: invalid type `void*' for default argument to 
`
   char*'
In file included from 14bit-tmrs.h:26,
                 from 16bit-registers.h:33,
                 from intcon.cc:28:
14bit-processors.h: In member function `virtual char*
   _14bit_processor::get_pin_name(unsigned int)':
14bit-processors.h:95: warning: invalid conversion from `void*' to `char*'
14bit-processors.h: In member function `virtual IOPIN*
   _14bit_processor::get_pin(unsigned int)':
14bit-processors.h:97: warning: invalid conversion from `void*' to 
`IOPIN*'
In file included from intcon.cc:29:
16bit-processors.h: In member function `virtual char*
   _16bit_processor::get_pin_name(unsigned int)':
16bit-processors.h:173: warning: invalid conversion from `void*' to 
`char*'
16bit-processors.h: In member function `virtual IOPIN*
   _16bit_processor::get_pin(unsigned int)':
16bit-processors.h:187: warning: invalid conversion from `void*' to 
`IOPIN*'
make[2]: *** [intcon.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive-am] Error 2
### execution of make failed, exit code 2
Failed: compiling gpsim-0.21.1-0 failed

Subject: Re: gpsim compiler preference?
From: Mike Durian ####@####.####
Date: 26 Jan 2004 01:02:55 -0000
Message-Id: <200401251732.41053.durian@shadetreesoftware.com>

On Sunday 25 January 2004 04:14 pm, Mikey Sklar wrote:
>
> Using gcc 3.1 and 3.3 I get invalid type warnings from intcon.cc which
> cascade into more errors further down. I assume this to just be gcc being
> more finiky with the 3.x revs. I am using panther 10.3.2.

I've compiled with gcc 3.3, so I don't think it is a compiler issue.  I
suspect, instead, that it is how NULL is defined on your system.  By
any chance, is NULL defined as (void *)0 on your system?

The safest fix is probably to change all usages of NULL in the gpsim
code to 0.  Then it doesn't matter how NULL is defined.

mike


Subject: Re: gpsim compiler preference?
From: Mikey Sklar ####@####.####
Date: 26 Jan 2004 02:19:38 -0000
Message-Id: <Pine.LNX.4.50.0401251741500.24616-100000@b7.d13.com>

On Sun, 25 Jan 2004, Mike Durian wrote:
> I've compiled with gcc 3.3, so I don't think it is a compiler issue.  I
> suspect, instead, that it is how NULL is defined on your system.  By
> any chance, is NULL defined as (void *)0 on your system?
> 
> The safest fix is probably to change all usages of NULL in the gpsim
> code to 0.  Then it doesn't matter how NULL is defined.

NULL is defined as 0 on my system.

Anyway I tried your suggestion and searched and repalced all the gpsim
code from NULL to 0. gpsim easly built for me on my MAC OS/X 10.3.2
system using gcc 3.3 after swapping NULL for 0.
Subject: Re: gpsim compiler preference?
From: Easy B ####@####.####
Date: 26 Jan 2004 22:43:27 -0000
Message-Id: <D57BBB13-504C-11D8-AC58-003065B74C10@freesurf.ch>

Good for you it worked, Mike.
I'm trying to compile this thing on Mac OS 10.3.2 for ages now and it's 
just not working. Starts well but than hangs with different errors. I 
got the cvs version, followed all the instructions and replaced all the 
NULLs with 0. This is the error I'm stuck with now:

Making all in gpsim
/bin/sh ../libtool --mode=link g++  -g -O3   -o gpsim 
-I/sw/include/gtk-1.2 -I/sw/include/glib-1.2 -I/sw/lib/glib/include 
-I/usr/X11R6/include main.o ../src/libgpsim.la ../cli/libgpsimcli.la 
../gui/libgpsimgui.la ../eXdbm/libgpsim_eXdbm.la    -lstdc++ -lpopt 
-L/sw/lib -L/usr/X11R6/lib -lgtk -lgdk -lgmodule -lglib -lintl -lXext 
-lX11 -lm -L/sw/lib -lgtk -lgdk -lgtkextra -lglib -lm
g++ -g -O3 -o .libs/gpsim -I/sw/include/gtk-1.2 -I/sw/include/glib-1.2 
-I/sw/lib/glib/include -I/usr/X11R6/include main.o -Wl,-bind_at_load  
../src/.libs/libgpsim.0.0.0.dylib -L/sw/lib -L/usr/X11R6/lib 
../cli/.libs/libgpsimcli.0.0.0.dylib 
../gui/.libs/libgpsimgui.0.0.0.dylib 
-L/sw/src/gtk+extra17-0.99.17-1/gtk+extra-0.99.17/gtkextra/.libs 
../eXdbm/.libs/libgpsim_eXdbm.0.0.0.dylib -lstdc++ 
/sw/lib/libpopt.dylib /sw/lib/libgmodule.dylib /sw/lib/libintl.dylib 
/sw/lib/libiconv.dylib /sw/lib/libgtk.dylib /sw/lib/libgdk.dylib 
/sw/lib/libgtkextra.dylib -lgtk -lgdk -lgmodule -lglib -lintl -lXext 
-lX11 /sw/lib/libglib.dylib -lm
ld: warning -L: directory name 
(/sw/src/gtk+extra17-0.99.17-1/gtk+extra-0.99.17/gtkextra/.libs) does 
not exist
ld: warning multiple definitions of symbol _locale_charset
/sw/lib/libintl.dylib(localcharset.lo) definition of _locale_charset
/sw/lib/libiconv.dylib(localcharset.o) definition of _locale_charset
ld: Undefined symbols:
_add_history
_readline
_rl_attempted_completion_function
_rl_callback_handler_install
_rl_callback_handler_remove
_rl_callback_read_char
_rl_completion_matches
_rl_copy_text
_rl_forced_update_display
_rl_initialize
make[2]: *** [gpsim] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Looks like something with gtk+extra. This seems funny to me: ld: 
warning -L: directory name 
(/sw/src/gtk+extra17-0.99.17-1/gtk+extra-0.99.17/gtkextra/.libs) does 
not exist, why should it look in a temporary source directory? Any 
Ideas? I don't, I'm not a UNIX guru. Would be cool to get it running 
someday and see it on fink.
Thanx for the help,
Ezra.

Am 26.01.2004 um 02:49 schrieb Mikey Sklar:

> On Sun, 25 Jan 2004, Mike Durian wrote:
>> I've compiled with gcc 3.3, so I don't think it is a compiler issue.  
>> I
>> suspect, instead, that it is how NULL is defined on your system.  By
>> any chance, is NULL defined as (void *)0 on your system?
>>
>> The safest fix is probably to change all usages of NULL in the gpsim
>> code to 0.  Then it doesn't matter how NULL is defined.
>
> NULL is defined as 0 on my system.
>
> Anyway I tried your suggestion and searched and repalced all the gpsim
> code from NULL to 0. gpsim easly built for me on my MAC OS/X 10.3.2
> system using gcc 3.3 after swapping NULL for 0.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####
>

[<<] [<] Page 1 of 1 [>] [>>]


Powered by ezmlm-browse 0.20.