Tallefer / 3doh

Automatically exported from code.google.com/p/3doh
1 stars 0 forks source link

Can't compile on fedora 19 64bit #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. make
2.
3.

What is the expected output? What do you see instead?
Program is compiled; errors instead.

What version of the product are you using? On what operating system?
Latest svn on Fedora 19 64bits

Please provide any additional information below.
[code]
localhost trunk]$ make

g++ -DUSEGL -g -Wall -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I./ 
-I./freedo -I./freedo/filters -fno-omit-frame-pointer -c freedo/arm.cpp -o 
freedo/arm.o
In file included from freedo/arm.cpp:29:0:

...

g++ -DUSEGL -g -Wall -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I./ 
-I./freedo -I./freedo/filters -fno-omit-frame-pointer -c freedo/_3do_sys.cpp -o 
freedo/_3do_sys.o
In file included from freedo/_3do_sys.cpp:27:0:

freedo/arm.h:33:30: warning: ‘__fastcall__’ attribute ignored [-Wattributes]
  int __fastcall _arm_Execute();
                              ^
freedo/arm.h:39:66: warning: ‘__fastcall__’ attribute ignored [-Wattributes]
  void __fastcall _mem_write8(unsigned int addr, unsigned char val);
                                                                  ^
freedo/arm.h:40:75: warning: ‘__fastcall__’ attribute ignored [-Wattributes]
         void __fastcall _mem_write16(unsigned int addr, unsigned short val);
                                                                           ^
freedo/arm.h:41:73: warning: ‘__fastcall__’ attribute ignored [-Wattributes]
         void __fastcall _mem_write32(unsigned int addr, unsigned int val);
                                                                         ^
freedo/arm.h:42:62: warning: ‘__fastcall__’ attribute ignored [-Wattributes]
         unsigned char __fastcall _mem_read8(unsigned int addr);
                                                              ^
freedo/arm.h:43:64: warning: ‘__fastcall__’ attribute ignored [-Wattributes]
         unsigned short __fastcall _mem_read16(unsigned int addr);
                                                                ^
freedo/arm.h:44:62: warning: ‘__fastcall__’ attribute ignored [-Wattributes]
         unsigned int __fastcall _mem_read32(unsigned int addr);
                                                              ^
freedo/arm.h:46:61: warning: ‘__fastcall__’ attribute ignored [-Wattributes]
  void __fastcall WriteIO(unsigned int addr, unsigned int val);
                                                             ^
freedo/arm.h:47:50: warning: ‘__fastcall__’ attribute ignored [-Wattributes]
  unsigned int __fastcall ReadIO(unsigned int addr);
                                                  ^
freedo/arm.h:48:33: warning: ‘__fastcall__’ attribute ignored [-Wattributes]
  void __fastcall SelectROM(int n);
                                 ^
In file included from freedo/_3do_sys.cpp:29:0:
freedo/DSP.h:34:61: warning: ‘__fastcall__’ attribute ignored [-Wattributes]
  unsigned short __fastcall _dsp_ReadIMem(unsigned short addr);
                                                             ^
freedo/DSP.h:35:72: warning: ‘__fastcall__’ attribute ignored [-Wattributes]
  void __fastcall _dsp_WriteIMem(unsigned short addr, unsigned short val);
                                                                        ^
freedo/DSP.h:36:73: warning: ‘__fastcall__’ attribute ignored [-Wattributes]
  void __fastcall _dsp_WriteMemory(unsigned short addr,unsigned short val);
                                                                         ^
freedo/DSP.h:37:42: warning: ‘__fastcall__’ attribute ignored [-Wattributes]
  void __fastcall _dsp_SetRunning(bool val);
                                          ^
freedo/DSP.h:38:54: warning: ‘__fastcall__’ attribute ignored [-Wattributes]
  void __fastcall _dsp_ARMwrite2sema4(unsigned int val);
                                                      ^
In file included from freedo/_3do_sys.cpp:30:0:
freedo/Clio.h:33:39: warning: ‘__fastcall__’ attribute ignored 
[-Wattributes]
         bool __fastcall _clio_NeedFIQ();
                                       ^
freedo/Clio.h:38:70: warning: ‘__fastcall__’ attribute ignored 
[-Wattributes]
  unsigned short  __fastcall _clio_GetEOFIFOStat(unsigned char channel);
                                                                      ^
freedo/Clio.h:39:70: warning: ‘__fastcall__’ attribute ignored 
[-Wattributes]
  unsigned short  __fastcall _clio_GetEIFIFOStat(unsigned char channel);
                                                                      ^
freedo/Clio.h:40:66: warning: ‘__fastcall__’ attribute ignored 
[-Wattributes]
  unsigned short  __fastcall _clio_EIFIFONI(unsigned short channel);
                                                                  ^
freedo/Clio.h:41:74: warning: ‘__fastcall__’ attribute ignored 
[-Wattributes]
  void  __fastcall _clio_EOFIFO(unsigned short channel, unsigned short val);
                                                                          ^
freedo/Clio.h:42:64: warning: ‘__fastcall__’ attribute ignored 
[-Wattributes]
  unsigned short  __fastcall _clio_EIFIFO(unsigned short channel);
                                                                ^
freedo/Clio.h:46:33: warning: ‘__fastcall__’ attribute ignored 
[-Wattributes]
  void __fastcall _clio_DoTimers();
                                 ^
freedo/Clio.h:47:54: warning: ‘__fastcall__’ attribute ignored 
[-Wattributes]
  unsigned int __fastcall _clio_Peek(unsigned int addr);
                                                      ^
freedo/Clio.h:48:63: warning: ‘__fastcall__’ attribute ignored 
[-Wattributes]
  int __fastcall _clio_Poke(unsigned int addr, unsigned int val);
                                                               ^
freedo/Clio.h:49:58: warning: ‘__fastcall__’ attribute ignored 
[-Wattributes]
  void __fastcall _clio_UpdateVCNT(int line, int halfframe);
                                                          ^
freedo/Clio.h:50:78: warning: ‘__fastcall__’ attribute ignored 
[-Wattributes]
  void __fastcall _clio_GenerateFiq(unsigned int reason1, unsigned int reason2);
                                                                              ^
In file included from freedo/_3do_sys.cpp:31:0:
freedo/Madam.h:46:66: warning: ‘__fastcall__’ attribute ignored 
[-Wattributes]
   void __fastcall _madam_Poke(unsigned int addr, unsigned int val);
                                                                  ^
freedo/Madam.h:47:56: warning: ‘__fastcall__’ attribute ignored 
[-Wattributes]
   unsigned int __fastcall _madam_Peek(unsigned int addr);
                                                        ^
In file included from freedo/_3do_sys.cpp:32:0:
freedo/SPORT.h:35:52: warning: ‘__fastcall__’ attribute ignored 
[-Wattributes]
  int __fastcall _sport_SetSource(unsigned int index);
                                                    ^
freedo/SPORT.h:37:74: warning: ‘__fastcall__’ attribute ignored 
[-Wattributes]
  void __fastcall _sport_WriteAccess(unsigned int index, unsigned int mask);
                                                                          ^
In file included from freedo/_3do_sys.cpp:34:0:
freedo/DiagPort.h:33:36: warning: ‘__fastcall__’ attribute ignored 
[-Wattributes]
  unsigned int __fastcall _diag_Get();
                                    ^
freedo/DiagPort.h:34:45: warning: ‘__fastcall__’ attribute ignored 
[-Wattributes]
  void __fastcall _diag_Send(unsigned int val);
                                             ^
In file included from freedo/_3do_sys.cpp:35:0:
freedo/quarz.h:27:27: warning: ‘__fastcall__’ attribute ignored 
[-Wattributes]
 void __fastcall _qrz_Init();
                           ^
freedo/quarz.h:29:32: warning: ‘__fastcall__’ attribute ignored 
[-Wattributes]
 int __fastcall _qrz_VDCurrLine();
                                ^
freedo/quarz.h:30:33: warning: ‘__fastcall__’ attribute ignored 
[-Wattributes]
 int __fastcall _qrz_VDHalfFrame();
                                 ^
freedo/quarz.h:31:36: warning: ‘__fastcall__’ attribute ignored 
[-Wattributes]
 int __fastcall _qrz_VDCurrOverline();
                                    ^
freedo/quarz.h:33:31: warning: ‘__fastcall__’ attribute ignored 
[-Wattributes]
 bool __fastcall _qrz_QueueVDL();
                               ^
freedo/quarz.h:34:31: warning: ‘__fastcall__’ attribute ignored 
[-Wattributes]
 bool __fastcall _qrz_QueueDSP();
                               ^
freedo/quarz.h:35:33: warning: ‘__fastcall__’ attribute ignored 
[-Wattributes]
 bool __fastcall _qrz_QueueTimer();
                                 ^
freedo/quarz.h:37:53: warning: ‘__fastcall__’ attribute ignored 
[-Wattributes]
 void __fastcall _qrz_PushARMCycles(unsigned int clks);
                                                     ^
freedo/_3do_sys.cpp: In function ‘void _3do_InternalFrame(int)’:
freedo/_3do_sys.cpp:130:71: warning: cast to pointer from integer of different 
size [-Wint-to-pointer-cast]
                         io_interface(EXT_PUSH_SAMPLE,(void*)_dsp_Loop());
                                                                       ^
freedo/_3do_sys.cpp:155:142: error: cast from ‘void*’ to ‘int’ loses 
precision [-fpermissive]
                                 _madam_KeyPressed((unsigned char*)io_interface(EXT_GETP_PBUSDATA,NULL),(int)io_interface(EXT_GET_PBUSLEN,NULL));
                                                                                                                                              ^
freedo/_3do_sys.cpp: At global scope:
freedo/_3do_sys.cpp:171:67: warning: ‘__fastcall__’ attribute ignored 
[-Wattributes]
 void __fastcall _3do_Frame(VDLFrame *frame, bool __scipframe=false)
                                                                   ^
freedo/_3do_sys.cpp: In function ‘void _3do_OnSector(unsigned int)’:
freedo/_3do_sys.cpp:269:43: warning: cast to pointer from integer of different 
size [-Wint-to-pointer-cast]
         io_interface(EXT_ON_SECTOR,(void*)sector);
                                           ^
freedo/_3do_sys.cpp: In function ‘unsigned int _3do_DiscSize()’:
freedo/_3do_sys.cpp:279:65: error: cast from ‘void*’ to ‘unsigned int’ 
loses precision [-fpermissive]
         return (unsigned int)io_interface(EXT_GET_DISC_SIZE,NULL);
                                                                 ^
freedo/_3do_sys.cpp: In function ‘void* _freedo_Interface(int, void*)’:
freedo/_3do_sys.cpp:290:41: warning: cast to pointer from integer of different 
size [-Wint-to-pointer-cast]
                 return (void*)_3do_Init();
                                         ^
freedo/_3do_sys.cpp:305:45: warning: cast to pointer from integer of different 
size [-Wint-to-pointer-cast]
                 return (void*)_3do_SaveSize();
                                             ^
freedo/_3do_sys.cpp:322:32: error: cast from ‘void*’ to ‘int’ loses 
precision [-fpermissive]
                 ARM_CLOCK=(int)datum;
                                ^
freedo/_3do_sys.cpp:325:36: error: cast from ‘void*’ to ‘int’ loses 
precision [-fpermissive]
                 __tex__scaler=(int)datum;
                                    ^
make: *** [freedo/_3do_sys.o] Error 1
[/code]

Original issue reported on code.google.com by dustin.m...@gmail.com on 16 Sep 2013 at 8:33

GoogleCodeExporter commented 9 years ago
The multiple "error: cast from ‘void*’ to ‘int’ loses precision" are 
because the Freedo code was written only with 32 bits in mind. I don't have a 
64 bit linux installed, but i will try to fix all of this errors.

Thank you for the feedback :)

Original comment by gabr...@arcadenea.com.ar on 19 Sep 2013 at 3:07

GoogleCodeExporter commented 9 years ago
Hi guaripolo , and thanks for your nice emu .
I ve do the libretro port and i fix 64bit compile for the libretro core
just by adding -fpermissive (like said in the error) maybe that can help too 
here.

Original comment by elrt...@gmail.com on 23 Sep 2013 at 10:39

GoogleCodeExporter commented 9 years ago
i've fixed it now in the right way, your fix may work now but gcc is getting 
more and more restrictive and it can be broken in the future.
Please test it now and tell me if it works fine.

Thank you both for the feedback, need to try libretro, seems like you are doing 
a great work there!

Original comment by gabr...@arcadenea.com.ar on 24 Sep 2013 at 12:36

GoogleCodeExporter commented 9 years ago

Original comment by gabr...@arcadenea.com.ar on 24 Sep 2013 at 12:36