Strange Compiling results. Is something deprecated?

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
Post Reply
User avatar
Protofall
DCEmu Crazy Poster
DCEmu Crazy Poster
Posts: 30
Joined: Sun Jan 14, 2018 8:03 pm
Location: Emu land
Has liked: 1 time
Been liked: 0
Contact:

Strange Compiling results. Is something deprecated?

Post by Protofall » Tue Apr 23, 2019 3:19 am

A year or more ago I made a simple demo to show palette usage and modification. Recently I decided to build this program on my current device and I get the following error

Code: Select all

a@LAPTOP-8SDROJHM:/mnt/c/Users/David Lenovo/Documents/code/Protofalls-KOS-Tests/KallistiOSTests/Palette$ make
rm -f paletteTest.cdi
mkdir -p cdfs
kos-cc -O2 -fomit-frame-pointer -ml -m4-single-only -ffunction-sections -fdata-sections  -I/opt/toolchains/dc/kos/include -I/opt/toolchains/dc/kos/kernel/arch/dreamcast/include -I/opt/toolchains/dc/kos/addons/include -I/opt/toolchains/dc/kos/../kos-ports/include -D_arch_dreamcast -D_arch_sub_pristine -Wall -g -fno-builtin -fno-strict-aliasing -c error.c -o error.o
In file included from error.c:3:0:
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/biosfont.h: In function ‘bfont_set_32bit_mode’:
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/biosfont.h:114:34: error: expected declaration specifiers before ‘__depr’
In file included from error.c:4:0:
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/video.h:54:1: warning: empty declaration [enabled by default]
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/video.h:75:1: warning: empty declaration [enabled by default]
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/video.h:153:3: error: storage class specified for parameter ‘vid_mode_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/video.h:156:19: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘vid_builtin’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/video.h:159:19: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/video.h:169:16: error: storage class specified for parameter ‘vram_s’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/video.h:172:16: error: storage class specified for parameter ‘vram_l’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/video.h:262:22: error: expected declaration specifiers or ‘...’ before ‘vid_mode_t’
In file included from /opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:39:0,
                 from error.c:5:
/opt/toolchains/dc/kos/addons/include/kos/img.h:52:3: error: storage class specified for parameter ‘kos_img_t’
/opt/toolchains/dc/kos/addons/include/kos/img.h:166:19: error: expected declaration specifiers or ‘...’ before ‘kos_img_t’
In file included from error.c:5:0:
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:49:16: error: storage class specified for parameter ‘pvr_ptr_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:58:16: error: storage class specified for parameter ‘pvr_list_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:155:9: error: expected specifier-qualifier-list before ‘pvr_ptr_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:178:9: error: expected specifier-qualifier-list before ‘pvr_ptr_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:180:3: error: storage class specified for parameter ‘pvr_poly_cxt_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:248:9: error: expected specifier-qualifier-list before ‘pvr_ptr_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:250:3: error: storage class specified for parameter ‘pvr_sprite_cxt_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:596:3: error: storage class specified for parameter ‘pvr_poly_hdr_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:613:3: error: storage class specified for parameter ‘pvr_poly_ic_hdr_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:631:3: error: storage class specified for parameter ‘pvr_poly_mod_hdr_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:649:3: error: storage class specified for parameter ‘pvr_sprite_hdr_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:667:3: error: storage class specified for parameter ‘pvr_mod_hdr_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:686:3: error: storage class specified for parameter ‘pvr_vertex_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:705:3: error: storage class specified for parameter ‘pvr_vertex_pcm_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:732:3: error: storage class specified for parameter ‘pvr_vertex_tpcm_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:763:3: error: storage class specified for parameter ‘pvr_sprite_txr_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:787:3: error: storage class specified for parameter ‘pvr_sprite_col_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:811:3: error: storage class specified for parameter ‘pvr_modifier_vol_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:836:58: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1127:3: error: storage class specified for parameter ‘pvr_init_params_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1141:14: error: expected declaration specifiers or ‘...’ before ‘pvr_init_params_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1229:3: error: storage class specified for parameter ‘pvr_stats_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1241:19: error: expected declaration specifiers or ‘...’ before ‘pvr_stats_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1289:64: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1389:1: error: expected declaration specifiers before ‘pvr_ptr_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1397:19: error: expected declaration specifiers or ‘...’ before ‘pvr_ptr_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1486:24: error: expected declaration specifiers or ‘...’ before ‘pvr_list_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1498:25: error: expected declaration specifiers or ‘...’ before ‘pvr_list_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1509:26: error: expected declaration specifiers or ‘...’ before ‘pvr_list_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1548:26: error: expected declaration specifiers or ‘...’ before ‘pvr_ptr_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1564:20: error: expected declaration specifiers or ‘...’ before ‘pvr_list_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1600:16: error: storage class specified for parameter ‘pvr_dr_state_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1645:19: error: expected declaration specifiers or ‘...’ before ‘pvr_list_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1656:20: error: expected declaration specifiers or ‘...’ before ‘pvr_list_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1707:23: error: expected declaration specifiers or ‘...’ before ‘pvr_poly_hdr_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1707:44: error: expected declaration specifiers or ‘...’ before ‘pvr_poly_cxt_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1717:23: error: expected declaration specifiers or ‘...’ before ‘pvr_poly_cxt_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1717:44: error: expected declaration specifiers or ‘...’ before ‘pvr_list_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1735:23: error: expected declaration specifiers or ‘...’ before ‘pvr_poly_cxt_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1735:44: error: expected declaration specifiers or ‘...’ before ‘pvr_list_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1736:58: error: expected declaration specifiers or ‘...’ before ‘pvr_ptr_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1747:25: error: expected declaration specifiers or ‘...’ before ‘pvr_sprite_hdr_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1748:25: error: expected declaration specifiers or ‘...’ before ‘pvr_sprite_cxt_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1758:25: error: expected declaration specifiers or ‘...’ before ‘pvr_sprite_cxt_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1758:48: error: expected declaration specifiers or ‘...’ before ‘pvr_list_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1776:25: error: expected declaration specifiers or ‘...’ before ‘pvr_sprite_cxt_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1776:48: error: expected declaration specifiers or ‘...’ before ‘pvr_list_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1777:60: error: expected declaration specifiers or ‘...’ before ‘pvr_ptr_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1794:22: error: expected declaration specifiers or ‘...’ before ‘pvr_mod_hdr_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1794:42: error: expected declaration specifiers or ‘...’ before ‘pvr_list_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1808:27: error: expected declaration specifiers or ‘...’ before ‘pvr_poly_mod_hdr_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1808:52: error: expected declaration specifiers or ‘...’ before ‘pvr_poly_cxt_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1820:27: error: expected declaration specifiers or ‘...’ before ‘pvr_poly_cxt_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1820:48: error: expected declaration specifiers or ‘...’ before ‘pvr_list_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1845:27: error: expected declaration specifiers or ‘...’ before ‘pvr_poly_cxt_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1845:48: error: expected declaration specifiers or ‘...’ before ‘pvr_list_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1847:27: error: expected declaration specifiers or ‘...’ before ‘pvr_ptr_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1849:27: error: expected declaration specifiers or ‘...’ before ‘pvr_ptr_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1865:31: error: expected declaration specifiers or ‘...’ before ‘pvr_ptr_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1909:34: error: expected declaration specifiers or ‘...’ before ‘pvr_ptr_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1939:24: error: expected declaration specifiers or ‘...’ before ‘kos_img_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1939:40: error: expected declaration specifiers or ‘...’ before ‘pvr_ptr_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1953:16: error: storage class specified for parameter ‘pvr_dma_callback_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:1984:33: error: expected declaration specifiers or ‘...’ before ‘pvr_dma_callback_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:2015:34: error: expected declaration specifiers or ‘...’ before ‘pvr_ptr_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:2016:22: error: expected declaration specifiers or ‘...’ before ‘pvr_dma_callback_t’
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/pvr.h:2039:21: error: expected declaration specifiers or ‘...’ before ‘pvr_dma_callback_t’
error.c:7:50: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
In file included from error.c:3:0:
/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/dc/biosfont.h:114:5: error: old-style parameter declarations in prototyped function definition
error.c:20:1: error: expected ‘{’ at end of input
error.c:20:1: warning: control reaches end of non-void function [-Wreturn-type]
/opt/toolchains/dc/kos/Makefile.rules:13: recipe for target 'error.o' failed
make: *** [error.o] Error 1
Basically `error.o` is failing for some reason and I'm not sure why. Based on the error with `__depr` it might seem one of the functions I'm using has since been deprecated? For reference when setting up KOS on my machines, I have always download the latest development build (But I never update it once installed). The KOS setup I originally made it in was from a year or so ago (Linux, Ubuntu) and my current device was setup and created a month or two ago (Windows, WSL). Maybe there was a recent change to KOS' development branch that deprecated a function I use in error.c/h? My KOS toolchain is successfully able to build the KOS PNG example along with some of my own programs I made so I think that's fine.

Here is my project folder. Despite the dependencies mentioned in the README, you won't need any of them (Except KOS) since `error.o` doesn't depend on any of them, just run `make error.o`
http://www.mediafire.com/file/0lfrvi0wn ... e.zip/file
Working on a recreation of Minesweeper for the Dreamcast <viewtopic.php?f=34&t=104820>

Twitter <https://twitter.com/ProfessorToffal>
YouTube (Not much there, but there are a few things) <https://www.youtube.com/user/TrueMenfa>
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5372
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has liked: 0
Been liked: 0
Contact:

Re: Strange Compiling results. Is something deprecated?

Post by BlueCrab » Tue Apr 23, 2019 7:27 am

Change the

Code: Select all

#include <sys/cdefs.h>
in the biosfont.h file to instead say

Code: Select all

#include <kos/cdefs.h>
and the issue should be fixed.

I've pushed the fix to the git repository, so you could also just "git pull" it and re-compile KOS (just KOS -- not the whole toolchain, obviously).
User avatar
Protofall
DCEmu Crazy Poster
DCEmu Crazy Poster
Posts: 30
Joined: Sun Jan 14, 2018 8:03 pm
Location: Emu land
Has liked: 1 time
Been liked: 0
Contact:

Re: Strange Compiling results. Is something deprecated?

Post by Protofall » Tue Apr 23, 2019 8:37 am

BlueCrab wrote:
Tue Apr 23, 2019 7:27 am
Change the

Code: Select all

#include <sys/cdefs.h>
in the biosfont.h file to instead say

Code: Select all

#include <kos/cdefs.h>
and the issue should be fixed.

I've pushed the fix to the git repository, so you could also just "git pull" it and re-compile KOS (just KOS -- not the whole toolchain, obviously).
Sweet, thanks for the quick response! :grin:
Working on a recreation of Minesweeper for the Dreamcast <viewtopic.php?f=34&t=104820>

Twitter <https://twitter.com/ProfessorToffal>
YouTube (Not much there, but there are a few things) <https://www.youtube.com/user/TrueMenfa>
Post Reply