Page 1 of 1

Trouble compiling latest source on OpenSUSE Tumbleweed

Posted: Wed 24 Apr, 2019 11:48 pm
by mforan89
Part way though the compilation I get this:

Code: Select all

make[1]: *** No rule to make target 'codegen_backend.c', needed by 'pcem-codegen_backend.o'.  Stop.
make[1]: *** Waiting for unfinished jobs....
mv -f .deps/pcem-cmd640.Tpo .deps/pcem-cmd640.Po
mv -f .deps/pcem-cdrom-image.Tpo .deps/pcem-cdrom-image.Po
mv -f .deps/pcem-codegen.Tpo .deps/pcem-codegen.Po
mv -f .deps/pcem-808x.Tpo .deps/pcem-808x.Po
mv -f .deps/pcem-386_dynarec_ops.Tpo .deps/pcem-386_dynarec_ops.Po
mv -f .deps/pcem-386_dynarec.Tpo .deps/pcem-386_dynarec.Po
make[1]: Leaving directory '/home/michael/Emulators/pcem/src'
make: *** [Makefile:364: all-recursive] Error 1
Any ideas?

Re: Trouble compiling latest source on OpenSUSE Tumbleweed

Posted: Thu 25 Apr, 2019 6:55 am
by szadycbr
hey in this thread viewtopic.php?f=3&t=3162&start=30 take the attached makefile.am and replace it in src directory. at first i just copy and rename codegen_backend.c to codegen_block.c or viceversa, anyway it go through but with erros of course. then it start complaining about automake mismatch and that automake 1.15 (debian 9) is used but files were generated by automake 1.16 (debian 10) , anyway after installing newer automake it says that is is probably to old? anyway is says to run aclocal to fix the problem, and yeah it did , it compiles without errors but it is still not working, it starts boot screen sometimes only and shows messed cpu alike /56mhz or 486sx instead of pentium etc. and it never boots, maybe it is still problem on my side with my compiler, anyway, has anyone run it on linux?

Re: Trouble compiling latest source on OpenSUSE Tumbleweed

Posted: Thu 25 Apr, 2019 7:18 am
by SarahWalker
Should be fixed in rev 1418.

Re: Trouble compiling latest source on OpenSUSE Tumbleweed

Posted: Thu 25 Apr, 2019 11:00 am
by szadycbr
Hi Sarah, thank you very much for this! this is great! now it compiles fine , without any error but something must be broken as i can not run any board, i did compile it on debian 9 , and any pentium, 386, 486 boards with various cpus does not work, i get boot screen sometimes , like this :
Screenshot from 2019-04-25 11-48-44.png
Screenshot from 2019-04-25 11-48-44.png (20.52 KiB) Viewed 9789 times
and then cursor blinking insanely fast :( . does anyone have an idea why it could be?
But still, i am so happy! this is great!! thanks so much :)

Re: Trouble compiling latest source on OpenSUSE Tumbleweed

Posted: Thu 25 Apr, 2019 11:25 am
by szadycbr
Now i see that i can run it fine on any cpu without recompiler :( so no recompiler in my build :(

Re: Trouble compiling latest source on OpenSUSE Tumbleweed

Posted: Thu 25 Apr, 2019 12:12 pm
by szadycbr
also i get this during compile :

Code: Select all

codegen_backend_x86-64.c: In function ‘codegen_backend_init’:
codegen_backend_x86-64.c:315:23: warning: passing argument 2 of ‘host_x86_CALL’ makes pointer from integer without a cast [-Wint-conversion]
  host_x86_CALL(block, (uintptr_t)x86gpf);
                       ^
In file included from codegen_backend_x86-64.c:8:0:
codegen_backend_x86-64_ops.h:18:6: note: expected ‘void *’ but argument is of type ‘long unsigned int’
 void host_x86_CALL(codeblock_t *block, void *p);
      ^~~~~~~~~~~~~
does it have anything to do with it?

Re: Trouble compiling latest source on OpenSUSE Tumbleweed

Posted: Thu 25 Apr, 2019 2:45 pm
by SarahWalker
Please provide details of your host machine.

Re: Trouble compiling latest source on OpenSUSE Tumbleweed

Posted: Thu 25 Apr, 2019 4:11 pm
by szadycbr
Hi Sarah, i did it on I5-2410m laptop using q$os (Debian 9) , and compiling tools from stretch repositories as below

Code: Select all

 ii  clang                                1:3.8-36                          amd64        C, C++ and Objective-C compiler (LLVM based)
ii  clang-3.8                            1:3.8.1-24                        amd64        C, C++ and Objective-C compiler (LLVM based)
ii  g++                                  4:6.3.0-4                         amd64        GNU C++ compiler
ii  g++-6                                6.3.0-18+deb9u1                   amd64        GNU C++ compiler
ii  gcc                                  4:6.3.0-4                         amd64        GNU C compiler
ii  gcc-6                                6.3.0-18+deb9u1                   amd64        GNU C compiler
ii  libllvm3.8:amd64                     1:3.8.1-24                        amd64        Modular compiler and toolchain technologies, runtime library
ii  libllvm3.9:amd64                     1:3.9.1-9                         amd64        Modular compiler and toolchain technologies, runtime library
ii  libllvm3.9:i386                      1:3.9.1-9                         i386         Modular compiler and toolchain technologies, runtime library
ii  libxkbcommon-dev                     0.7.1-2~deb9u1                    amd64        library interface to the XKB compiler - development files
ii  libxkbcommon0:amd64                  0.7.1-2~deb9u1                    amd64        library interface to the XKB compiler - shared library
ii  libxkbcommon0:i386                   0.7.1-2~deb9u1                    i386         library interface to the XKB compiler - shared library
ii  linux-compiler-gcc-6-x86             4.9.144-3.1                       amd64        Compiler for Linux on x86 (meta-package)
ii  llvm-3.8                             1:3.8.1-24                        amd64        Modular compiler and toolchain technologies
ii  llvm-3.8-dev                         1:3.8.1-24                        amd64        Modular compiler and toolchain technologies, libraries and headers
ii  llvm-3.8-runtime                     1:3.8.1-24   
Dont know what else could i provide, make version is 4.1-9.1 , autotools installed. strange, will try to figure it out, let You know if i do find some clue, Thanks very much, You did it! PCem should be voted undoubtedly best PC emulator up to date :)

Re: Trouble compiling latest source on OpenSUSE Tumbleweed

Posted: Thu 25 Apr, 2019 4:40 pm
by szadycbr
sorry for spamming but i noticed that i had few more warnings up above in terminal but i didnt see it at first :

Code: Select all

  
codegen_allocator.c: In function ‘codegen_allocator_allocate’:
codegen_allocator.c:56:28: warning: implicit declaration of function ‘rand’ [-Wimplicit-function-declaration]
                 block_nr = rand() & MEM_BLOCK_MASK;
                            ^~~
and then this :

Code: Select all

 codegen_reg.c: In function ‘codegen_reg_load’:
codegen_reg.c:277:83: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
                         codegen_direct_read_16_stack(block, reg_set->reg_list[c], (int)ireg_data[IREG_GET_REG(ir_reg.reg)].p);
                                                                                   ^
codegen_reg.c:286:83: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
                         codegen_direct_read_32_stack(block, reg_set->reg_list[c], (int)ireg_data[IREG_GET_REG(ir_reg.reg)].p);
                                                                                   ^
codegen_reg.c:295:83: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
                         codegen_direct_read_64_stack(block, reg_set->reg_list[c], (int)ireg_data[IREG_GET_REG(ir_reg.reg)].p);
                                                                                   ^
codegen_reg.c:304:88: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
                         codegen_direct_read_pointer_stack(block, reg_set->reg_list[c], (int)ireg_data[IREG_GET_REG(ir_reg.reg)].p);
                                                                                        ^
codegen_reg.c:313:87: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
                         codegen_direct_read_double_stack(block, reg_set->reg_list[c], (int)ireg_data[IREG_GET_REG(ir_reg.reg)].p);
                                                                                       ^
codegen_reg.c: In function ‘codegen_reg_writeback’:
codegen_reg.c:385:62: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
                         codegen_direct_write_32_stack(block, (int)p, reg_set->reg_list[c]);
                                                              ^
codegen_reg.c:394:62: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
                         codegen_direct_write_64_stack(block, (int)p, reg_set->reg_list[c]);
                                                              ^
codegen_reg.c:411:66: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
                         codegen_direct_write_double_stack(block, (int)p, reg_set->reg_list[c]);
Edit: my os is 64 bit multiarch.

Re: Trouble compiling latest source on OpenSUSE Tumbleweed

Posted: Thu 25 Apr, 2019 10:11 pm
by mforan89
Ok, so I got past that error now I'm getting something different:

Code: Select all

wx-sdl2-joystick.c:(.text+0x104): undefined reference to `SDL_InitSubSystem'
/usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: wx-sdl2-joystick.c:(.text+0x109): undefined reference to `SDL_NumJoysticks'
/usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: wx-sdl2-joystick.c:(.text+0x183): undefined reference to `SDL_JoystickOpen'
/usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: wx-sdl2-joystick.c:(.text+0x1af): undefined reference to `SDL_JoystickName'
/usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: wx-sdl2-joystick.c:(.text+0x1c9): undefined reference to `SDL_JoystickNumAxes'
/usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: wx-sdl2-joystick.c:(.text+0x1e2): undefined reference to `SDL_JoystickNumButtons'
/usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: wx-sdl2-joystick.c:(.text+0x1fb): undefined reference to `SDL_JoystickNumHats'
/usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: wx-sdl2-joystick.c:(.text+0x213): undefined reference to `SDL_JoystickNameForIndex'
/usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: wx-sdl2-joystick.c:(.text+0x22c): undefined reference to `SDL_JoystickNumAxes'
/usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: wx-sdl2-joystick.c:(.text+0x23b): undefined reference to `SDL_JoystickNumButtons'
/usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: wx-sdl2-joystick.c:(.text+0x24a): undefined reference to `SDL_JoystickNumHats'
/usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: pcem-wx-sdl2-joystick.o: in function `joystick_close':
wx-sdl2-joystick.c:(.text+0x37b): undefined reference to `SDL_JoystickClose'
/usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: pcem-wx-sdl2-joystick.o: in function `joystick_poll':
wx-sdl2-joystick.c:(.text+0x3af): undefined reference to `SDL_JoystickUpdate'
/usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: wx-sdl2-joystick.c:(.text+0x3e9): undefined reference to `SDL_JoystickGetAxis'
/usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: wx-sdl2-joystick.c:(.text+0x3fb): undefined reference to `SDL_JoystickGetAxis'
/usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: wx-sdl2-joystick.c:(.text+0x40d): undefined reference to `SDL_JoystickGetAxis'
/usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: wx-sdl2-joystick.c:(.text+0x41f): undefined reference to `SDL_JoystickGetAxis'
There's more of the same after that.