Menu

#1614 Cannot build VICE anymore.

v3.6
closed-fixed
None
Tape
2021-12-30
2021-11-14
No

From my message sent to the mailing list:

I just updated my sources from repository and I cannot build them anymore. I'm getting this message:

~~~
../src/datasette/libdatasette.a(datasette.o): in function datasette_internal_reset': /home/Carlo/vice-emu-code/v1_x86_64/src/datasette/../../../vice/src/datasette/datasette.c:910: undefined reference totapeport_valid_port'
make[3]: *** [Makefile:1777: x64dtv.exe] Error 1
~~~

It seems to me that there is a bug into src\Makefile.am because targets $x64dtv_libs and $xscpu64_libs are linking with $(datasette_lib) but they are missing $(tapeport_lib).
BTW, targets $x64_libs, $x64sc_libs and $x128_libs have $(tapeport_lib) multiple times, it would be worth to have just one of them.

However, adding $(tapeport_lib) is not enough. I did it and the undefined reference to tapeport_valid_port is gone, but now it complains other undefined references from tapeport library.
Probably, the bug happens after r41116.
Since it is getting more complex than expected, I'm filing a bug.

Discussion

  • Marco van den Heuvel

    I cannot reproduce this, can you please do a 'make clean' and then a './autogen.sh' and then './configure ...etc' and then a 'make' and see what happens.

     
  • Marco van den Heuvel

    I'm compiling for sdl, current trunk, and I do not get the link error, when I scan through the resulting x64dtv.exe there is no mention of tapeport_valid_port what so ever. datasette.c should not even be linked into x64dtv.exe. that's why I'm thinking something went wrong with the makefile generation, and that's why I suggest you do a clean build.

     
  • Marco van den Heuvel

    I can see that libdatasette.a is used for x64dtv, let me remove it from the linking.

     
  • Marco van den Heuvel

    please try again with rev 41133

     
  • Carlo Bramini

    Carlo Bramini - 2021-11-14

    I updated the sources with your changes and now I'm getting these new errors:

      CCLD     x64dtv.exe
    /usr/lib/gcc/x86_64-w64-mingw32/11/../../../../x86_64-w64-mingw32/bin/ld: autostart.o: in function `autostart_tape':
    /home/Carlo/vice-emu-code/v1_x86_64/src/../../vice/src/autostart.c:1494: undefined reference to `datasette_control'
    /usr/lib/gcc/x86_64-w64-mingw32/11/../../../../x86_64-w64-mingw32/bin/ld: autostart.o: in function `advance_pressplayontape':
    /home/Carlo/vice-emu-code/v1_x86_64/src/../../vice/src/autostart.c:1020: undefined reference to `datasette_control'
    /usr/lib/gcc/x86_64-w64-mingw32/11/../../../../x86_64-w64-mingw32/bin/ld: event.o: in function `event_alarm_handler':
    /home/Carlo/vice-emu-code/v1_x86_64/src/../../vice/src/event.c:414: undefined reference to `datasette_event_playback_port1'
    /usr/lib/gcc/x86_64-w64-mingw32/11/../../../../x86_64-w64-mingw32/bin/ld: event.o: in function `event_playback_event_list':
    /home/Carlo/vice-emu-code/v1_x86_64/src/../../vice/src/event.c:487: undefined reference to `datasette_event_playback_port1'
    /usr/lib/gcc/x86_64-w64-mingw32/11/../../../../x86_64-w64-mingw32/bin/ld: ../src/monitor/libmonitor.a(monitor.o): in function `mon_tape_ctrl':
    /home/Carlo/vice-emu-code/v1_x86_64/src/monitor/../../../vice/src/monitor/monitor.c:1236: undefined reference to `datasette_control'
    /usr/lib/gcc/x86_64-w64-mingw32/11/../../../../x86_64-w64-mingw32/bin/ld: ../src/tape/libtape.a(tape.o): in function `tape_image_detach_internal':
    /home/Carlo/vice-emu-code/v1_x86_64/src/tape/../../../vice/src/tape/tape.c:479: undefined reference to `datasette_set_tape_image'
    /usr/lib/gcc/x86_64-w64-mingw32/11/../../../../x86_64-w64-mingw32/bin/ld: /home/Carlo/vice-emu-code/v1_x86_64/src/tape/../../../vice/src/tape/tape.c:474: undefined reference to `datasette_set_tape_sense'
    /usr/lib/gcc/x86_64-w64-mingw32/11/../../../../x86_64-w64-mingw32/bin/ld: ../src/tape/libtape.a(tape.o): in function `tape_image_attach_internal':
    /home/Carlo/vice-emu-code/v1_x86_64/src/tape/../../../vice/src/tape/tape.c:558: undefined reference to `datasette_set_tape_image'
    /usr/lib/gcc/x86_64-w64-mingw32/11/../../../../x86_64-w64-mingw32/bin/ld: /home/Carlo/vice-emu-code/v1_x86_64/src/tape/../../../vice/src/tape/tape.c:555: undefined reference to `datasette_set_tape_sense'
    collect2: error: ld returned 1 exit status
    make[3]: *** [Makefile:1773: x64dtv.exe] Error 1
    

    EDIT: now, also GTK3 does not build anymore here.

     

    Last edit: Carlo Bramini 2021-11-14
  • Marco van den Heuvel

    Sorry about that, I undid the change I made, did a clean sdl build and now it builds like normal again.

     
  • Marco van den Heuvel

    found the issue, fixing.

     
  • Marco van den Heuvel

    Fixed in rev 41137, please try again.

     
  • Marco van den Heuvel

    • status: open --> pending-fixed
    • assigned_to: Marco van den Heuvel
     
  • Querino

    Querino - 2021-11-14

    missing includes?

    c64dtvstubs.c:50:5: warning: no previous prototype for 'machine_autodetect_psid' [-Wmissing-prototypes]
    int machine_autodetect_psid(const char name)
    ^~~~~~~~~~~~~~~~~~~~~~~
    c64dtvstubs.c:68:5: warning: no previous prototype for 'tapecart_is_valid' [-Wmissing-prototypes]
    int tapecart_is_valid(const char
    filename)
    ^~~~~~~~~~~~~~~~~
    c64dtvstubs.c:73:5: warning: no previous prototype for 'tapecart_attach_tcrt' [-Wmissing-prototypes]
    int tapecart_attach_tcrt(const char filename, void unused)

    btw, are there any advantages using clang instead of gcc?
    faster compile, faster executables, smaller executables?

     
  • compyx

    compyx - 2021-11-14

    Just fixed the missing #includes.

    clang and gcc seem to catch different issues, with clang usually being a little better at that. And clang has better tooling for static analysis and such, in my experience anyway.

    As for better/smaller code or faster compiling, I haven't really tested that, but I don't think there's any major differences. I'm sure there are websites out there giving you all those details for the various versions of each compiler suite ;)

     
  • Querino

    Querino - 2021-11-14

    thanks.

    I'm sure there are websites out there giving you all those details for the various versions of each compiler suite ;)

    i know there are such websites, but afaik advantages/disadvantages depend on WHAT you are compiling, that's why i asked here. :)
    but as you say, most likely no major differences.
    so yeah, enough of this offtopic.

     
  • Carlo Bramini

    Carlo Bramini - 2021-11-15

    I compiled successfully. Thank you!

     
  • Marco van den Heuvel

    • status: pending-fixed --> closed-fixed
     

Log in to post a comment.