Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't compile with GCC 8.4.0 #527

Open
FrostKnight opened this issue Nov 13, 2024 · 15 comments
Open

Can't compile with GCC 8.4.0 #527

FrostKnight opened this issue Nov 13, 2024 · 15 comments
Labels
building issue related to compiling or packaging the game

Comments

@FrostKnight
Copy link

Using Hyperbola GNU/Linux-Libre
the testing version

followed the commands after downloading and unzipping the master:

cmake -G"Unix Makefiles" -Bbuild .

then

cmake --build build -j2

and this happens:

[ 1%] Generating src/generated/ntsc-final/lang/ame.h
Traceback (most recent call last):
File "/home/user/perfect_dark-port/tools/assetmgr/mklang", line 3, in
import assetmgr
File "/home/user/perfect_dark-port/tools/assetmgr/assetmgr.py", line 163, in
os.environ['ROMID'] = arg.removeprefix('--romid=')
AttributeError: 'str' object has no attribute 'removeprefix'
make[2]: *** [CMakeFiles/pd_headers.dir/build.make:267: src/generated/ntsc-final/lang/ame.h] Error 1
make[1]: *** [CMakeFiles/Makefile2:85: CMakeFiles/pd_headers.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

@fgsfdsfgs
Copy link
Owner

Looks like you don't have Python 3.9. I changed the script in question, so it should work with lower versions now.

@FrostKnight
Copy link
Author

Looks like you don't have Python 3.9. I changed the script in question, so it should work with lower versions now.

Ran into other problem

/home/user/perfect_dark/port/src/preprocess/filemodel.c: In function ‘populateMarkers’:
/home/user/perfect_dark/port/src/preprocess/filemodel.c:266:4: error: a label can only be part of a statement and a declaration is not a statement
struct n64_modeldef *src_modeldef = src_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:267:4: error: expected expression before ‘int’
int num_texconfigs = PD_BE16(src_modeldef->numtexconfigs);
^~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:272:24: error: ‘num_texconfigs’ undeclared (first use in this function); did you mean ‘texconfigpos’?
for (int i = 0; i < num_texconfigs; i++) {
^~~~~~~~~~~~~~
texconfigpos
/home/user/perfect_dark/port/src/preprocess/filemodel.c:272:24: note: each undeclared identifier is reported only once for each function it appears in
/home/user/perfect_dark/port/src/preprocess/filemodel.c:277:4: error: a label can only be part of a statement and a declaration is not a statement
struct n64_modelnode *src_node = src_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:278:4: error: expected expression before ‘u32’
u32 node_type = PD_BE16(src_node->type) & 0xff;
^~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:279:67: error: ‘node_type’ undeclared (first use in this function); did you mean ‘hovtype’?
setMarker(PD_BE32(src_node->ptr_rodata), nodeTypeToContentType[node_type], marker->src_offset);
^~~~~~~~~
hovtype
/home/user/perfect_dark/port/src/preprocess/filemodel.c:286:4: error: a label can only be part of a statement and a declaration is not a statement
struct n64_textureconfig *src_texconfig = src_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:292:4: error: a label can only be part of a statement and a declaration is not a statement
struct n64_modeldef *src_modeldef2 = (struct n64_modeldef *) src;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:293:4: error: expected expression before ‘u32’
u32 *src_parts = (u32 *) src_thing;
^~~
In file included from /home/user/perfect_dark/include/PR/R4300.h:25,
from /home/user/perfect_dark/include/PR/rcp.h:27,
from /home/user/perfect_dark/include/ultra64.h:26,
from /home/user/perfect_dark/src/include/types.h:3,
from /home/user/perfect_dark/port/src/preprocess/filemodel.c:5:
/home/user/perfect_dark/port/src/preprocess/filemodel.c:297:23: error: ‘src_parts’ undeclared (first use in this function); did you mean ‘num_parts’?
setMarker(PD_BE32(src_parts[i]), CT_NODE, marker->src_offset);
^~~~~~~~~
/home/user/perfect_dark/src/include/platform.h:52:42: note: in definition of macro ‘PD_BSWAP32’
#define PD_BSWAP32(x) __builtin_bswap32(x)
^
/home/user/perfect_dark/port/src/preprocess/filemodel.c:297:15: note: in expansion of macro ‘PD_BE32’
setMarker(PD_BE32(src_parts[i]), CT_NODE, marker->src_offset);
^~~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:305:4: error: a label can only be part of a statement and a declaration is not a statement
struct n64_modelrodata_gundl *src_gundl = src_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:311:4: error: a label can only be part of a statement and a declaration is not a statement
struct n64_modelrodata_distance *src_dist = src_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:315:4: error: a label can only be part of a statement and a declaration is not a statement
struct n64_modelrodata_reorder *src_reorder = src_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:320:4: error: a label can only be part of a statement and a declaration is not a statement
struct n64_modelrodata_chrgunfire *src_chrgunfire = src_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:324:4: error: a label can only be part of a statement and a declaration is not a statement
struct n64_modelrodata_toggle *src_toggle = src_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:328:4: error: a label can only be part of a statement and a declaration is not a statement
struct n64_modelrodata_stargunfire *src_stargunfire = src_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:341:4: error: a label can only be part of a statement and a declaration is not a statement
struct n64_modelrodata_dl *src_dl = src_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c: In function ‘convertContent’:
/home/user/perfect_dark/port/src/preprocess/filemodel.c:400:4: error: a label can only be part of a statement and a declaration is not a statement
struct n64_modeldef *src_modeldef = src_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:401:4: error: expected expression before ‘struct’
struct modeldef *dst_modeldef = dst_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:402:4: error: ‘dst_modeldef’ undeclared (first use in this function); did you mean ‘src_modeldef’?
dst_modeldef->skel = (void *)(uintptr_t)PD_BE32(src_modeldef->ptr_skel);
^~~~~~~~~~~~
src_modeldef
/home/user/perfect_dark/port/src/preprocess/filemodel.c:411:4: error: a label can only be part of a statement and a declaration is not a statement
struct n64_modelnode *src_node = src_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:412:4: error: expected expression before ‘struct’
struct modelnode *dst_node = dst_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:413:4: error: ‘dst_node’ undeclared (first use in this function); did you mean ‘src_node’?
dst_node->type = PD_BE16(src_node->type);
^~~~~~~~
src_node
/home/user/perfect_dark/port/src/preprocess/filemodel.c:417:4: error: a label can only be part of a statement and a declaration is not a statement
struct n64_textureconfig *src_texconfig = src_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:418:4: error: expected expression before ‘struct’
struct textureconfig *dst_texconfig = dst_thing;
^~~~~~
[ 37%] Building C object CMakeFiles/pd.dir/port/src/preprocess/segfonts.c.o
[ 37%] Building C object CMakeFiles/pd.dir/port/src/romdata.c.o
/home/user/perfect_dark/port/src/preprocess/filemodel.c:422:6: error: ‘dst_texconfig’ undeclared (first use in this function); did you mean ‘src_texconfig’?
dst_texconfig->textureptr = (void *)(uintptr_t)PD_BE32(src_texconfig->ptr);
^~~~~~~~~~~~~
src_texconfig
/home/user/perfect_dark/port/src/preprocess/filemodel.c:445:4: error: a label can only be part of a statement and a declaration is not a statement
struct n64_modeldef *src_modeldef2 = (struct n64_modeldef *) src;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:446:4: error: expected expression before ‘u32’
u32 *src_parts = (u32 *) src_thing;
^~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:449:29: error: ‘src_parts’ undeclared (first use in this function); did you mean ‘num_parts’?
u16 *src_nums = (u16 *) &src_parts[num_parts];
^~~~~~~~~
num_parts
/home/user/perfect_dark/port/src/preprocess/filemodel.c:466:4: error: a label can only be part of a statement and a declaration is not a statement
struct marker *parent = findMarker(marker->parent_src_offset);
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:467:4: error: expected expression before ‘u32’
u32 src_vtx;
^~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:473:5: error: ‘src_vtx’ undeclared (first use in this function); did you mean ‘dst_vtx’?
src_vtx = PD_BE32(src_rodata->ptr_vertices) & 0x00ffffff;
^~~~~~~
dst_vtx
/home/user/perfect_dark/port/src/preprocess/filemodel.c:490:4: error: a label can only be part of a statement and a declaration is not a statement
struct modelrodata_chrinfo *src_chrinfo = src_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:491:4: error: expected expression before ‘struct’
struct modelrodata_chrinfo *dst_chrinfo = dst_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:492:4: error: ‘dst_chrinfo’ undeclared (first use in this function); did you mean ‘src_chrinfo’?
dst_chrinfo->animpart = PD_BE16(src_chrinfo->animpart);
^~~~~~~~~~~
src_chrinfo
/home/user/perfect_dark/port/src/preprocess/filemodel.c:499:4: error: a label can only be part of a statement and a declaration is not a statement
struct modelrodata_position *src_position = src_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:500:4: error: expected expression before ‘struct’
struct modelrodata_position *dst_position = dst_thing;
^~~~~~
[ 37%] Building C object CMakeFiles/pd.dir/port/src/system.c.o
/home/user/perfect_dark/port/src/preprocess/filemodel.c:501:4: error: ‘dst_position’ undeclared (first use in this function); did you mean ‘src_position’?
dst_position->pos = PD_SWAPPED_VAL(src_position->pos);
^~~~~~~~~~~~
src_position
/home/user/perfect_dark/port/src/preprocess/filemodel.c:510:4: error: a label can only be part of a statement and a declaration is not a statement
struct n64_modelrodata_gundl *src_gundl = src_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:511:4: error: expected expression before ‘struct’
struct modelrodata_gundl *dst_gundl = dst_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:512:4: error: ‘dst_gundl’ undeclared (first use in this function); did you mean ‘src_gundl’?
dst_gundl->vertices = NULL;
^~~~~~~~~
src_gundl
/home/user/perfect_dark/port/src/preprocess/filemodel.c:518:4: error: a label can only be part of a statement and a declaration is not a statement
struct n64_modelrodata_distance *src_dist = src_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:519:4: error: expected expression before ‘struct’
struct modelrodata_distance *dst_dist = dst_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:520:4: error: ‘dst_dist’ undeclared (first use in this function); did you mean ‘src_dist’?
dst_dist->near = PD_SWAPPED_VAL(src_dist->near);
^~~~~~~~
src_dist
/home/user/perfect_dark/port/src/preprocess/filemodel.c:526:4: error: a label can only be part of a statement and a declaration is not a statement
struct n64_modelrodata_reorder *src_reorder = src_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:527:4: error: expected expression before ‘struct’
struct modelrodata_reorder *dst_reorder = dst_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:528:4: error: ‘dst_reorder’ undeclared (first use in this function); did you mean ‘src_reorder’?
dst_reorder->unk00 = PD_SWAPPED_VAL(src_reorder->unk00);
^~~~~~~~~~~
src_reorder
/home/user/perfect_dark/port/src/preprocess/filemodel.c:539:4: error: a label can only be part of a statement and a declaration is not a statement
struct modelrodata_bbox *src_bbox = src_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:540:4: error: expected expression before ‘struct’
struct modelrodata_bbox *dst_bbox = dst_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:541:4: error: ‘dst_bbox’ undeclared (first use in this function); did you mean ‘src_bbox’?
dst_bbox->hitpart = PD_BE32(src_bbox->hitpart);
^~~~~~~~
src_bbox
/home/user/perfect_dark/port/src/preprocess/filemodel.c:551:4: error: a label can only be part of a statement and a declaration is not a statement
struct n64_modelrodata_chrgunfire *src_chrgunfire = src_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:552:4: error: expected expression before ‘struct’
struct modelrodata_chrgunfire *dst_chrgunfire = dst_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:553:4: error: ‘dst_chrgunfire’ undeclared (first use in this function); did you mean ‘src_chrgunfire’?
dst_chrgunfire->pos = PD_SWAPPED_VAL(src_chrgunfire->pos);
^~~~~~~~~~~~~~
src_chrgunfire
/home/user/perfect_dark/port/src/preprocess/filemodel.c:561:4: error: a label can only be part of a statement and a declaration is not a statement
struct n64_modelrodata_type11 *src_type11 = src_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:562:4: error: expected expression before ‘struct’
struct modelrodata_type11 *dst_type11 = dst_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:563:4: error: ‘dst_type11’ undeclared (first use in this function); did you mean ‘src_type11’?
dst_type11->unk00 = PD_BE32(src_type11->unk00);
^~~~~~~~~~
src_type11
/home/user/perfect_dark/port/src/preprocess/filemodel.c:574:4: error: a label can only be part of a statement and a declaration is not a statement
struct n64_modelrodata_toggle *src_toggle = src_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:575:4: error: expected expression before ‘struct’
struct modelrodata_toggle *dst_toggle = dst_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:576:4: error: ‘dst_toggle’ undeclared (first use in this function); did you mean ‘src_toggle’?
dst_toggle->rwdataindex = PD_BE16(src_toggle->rwdataindex);
^~~~~~~~~~
src_toggle
/home/user/perfect_dark/port/src/preprocess/filemodel.c:580:4: error: a label can only be part of a statement and a declaration is not a statement
struct modelrodata_positionheld *src_posheld = src_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:581:4: error: expected expression before ‘struct’
struct modelrodata_positionheld *dst_posheld = dst_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:582:4: error: ‘dst_posheld’ undeclared (first use in this function); did you mean ‘src_posheld’?
dst_posheld->pos = PD_SWAPPED_VAL(src_posheld->pos);
^~~~~~~~~~~
src_posheld
/home/user/perfect_dark/port/src/preprocess/filemodel.c:588:4: error: a label can only be part of a statement and a declaration is not a statement
struct n64_modelrodata_stargunfire *src_stargunfire = src_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:589:4: error: expected expression before ‘struct’
struct modelrodata_stargunfire *dst_stargunfire = dst_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:590:4: error: ‘dst_stargunfire’ undeclared (first use in this function); did you mean ‘src_stargunfire’?
dst_stargunfire->unk00 = PD_BE32(src_stargunfire->unk00);
^~~~~~~~~~~~~~~
src_stargunfire
/home/user/perfect_dark/port/src/preprocess/filemodel.c:594:4: error: a label can only be part of a statement and a declaration is not a statement
struct modelrodata_headspot *src_headspot = src_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:595:4: error: expected expression before ‘struct’
struct modelrodata_headspot *dst_headspot = dst_thing;
^~~~~~
[ 37%] Building C object CMakeFiles/pd.dir/port/src/utils.c.o
/home/user/perfect_dark/port/src/preprocess/filemodel.c:596:4: error: ‘dst_headspot’ undeclared (first use in this function); did you mean ‘src_headspot’?
dst_headspot->rwdataindex = PD_BE16(src_headspot->rwdataindex);
^~~~~~~~~~~~
src_headspot
/home/user/perfect_dark/port/src/preprocess/filemodel.c:600:4: error: a label can only be part of a statement and a declaration is not a statement
struct n64_modelrodata_dl *src_dl = src_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:601:4: error: expected expression before ‘struct’
struct modelrodata_dl *dst_dl = dst_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:602:4: error: ‘dst_dl’ undeclared (first use in this function); did you mean ‘src_dl’?
dst_dl->numvertices = PD_BE16(src_dl->numvertices);
^~~~~~
src_dl
/home/user/perfect_dark/port/src/preprocess/filemodel.c:609:4: error: a label can only be part of a statement and a declaration is not a statement
struct modelrodata_type19 *src_type19 = src_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:610:4: error: expected expression before ‘struct’
struct modelrodata_type19 *dst_type19 = dst_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:615:4: error: ‘dst_type19’ undeclared (first use in this function); did you mean ‘src_type19’?
dst_type19->numvertices = (num_vertices);
^~~~~~~~~~
src_type19
/home/user/perfect_dark/port/src/preprocess/filemodel.c: In function ‘relinkPointers’:
/home/user/perfect_dark/port/src/preprocess/filemodel.c:658:4: error: a label can only be part of a statement and a declaration is not a statement
struct n64_modeldef *src_modeldef = src_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:659:4: error: expected expression before ‘struct’
struct modeldef *dst_modeldef = dst_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:660:4: error: ‘dst_modeldef’ undeclared (first use in this function); did you mean ‘src_modeldef’?
dst_modeldef->rootnode = (void *)(uintptr_t)resolvePointer(PD_BE32(src_modeldef->ptr_rootnode));
^~~~~~~~~~~~
src_modeldef
/home/user/perfect_dark/port/src/preprocess/filemodel.c:665:4: error: a label can only be part of a statement and a declaration is not a statement
struct n64_modelnode *src_node = src_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:666:4: error: expected expression before ‘struct’
struct modelnode *dst_node = dst_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:667:4: error: ‘dst_node’ undeclared (first use in this function); did you mean ‘src_node’?
dst_node->rodata = (void *)(uintptr_t)resolvePointer(PD_BE32(src_node->ptr_rodata));
^~~~~~~~
src_node
/home/user/perfect_dark/port/src/preprocess/filemodel.c:676:4: error: a label can only be part of a statement and a declaration is not a statement
struct n64_textureconfig *src_texconfig = src_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:677:4: error: expected expression before ‘struct’
struct textureconfig *dst_texconfig = dst_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:679:5: error: ‘dst_texconfig’ undeclared (first use in this function); did you mean ‘src_texconfig’?
dst_texconfig->textureptr = (void *)(uintptr_t)resolvePointer(PD_BE32(src_texconfig->ptr));
^~~~~~~~~~~~~
src_texconfig
/home/user/perfect_dark/port/src/preprocess/filemodel.c:684:4: error: a label can only be part of a statement and a declaration is not a statement
struct n64_modeldef *src_modeldef2 = (struct n64_modeldef *) src;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:685:4: error: expected expression before ‘u32’
u32 *src_parts = (u32 *) src_thing;
^~~
In file included from /home/user/perfect_dark/include/PR/R4300.h:25,
from /home/user/perfect_dark/include/PR/rcp.h:27,
from /home/user/perfect_dark/include/ultra64.h:26,
from /home/user/perfect_dark/src/include/types.h:3,
from /home/user/perfect_dark/port/src/preprocess/filemodel.c:5:
/home/user/perfect_dark/port/src/preprocess/filemodel.c:690:44: error: ‘src_parts’ undeclared (first use in this function); did you mean ‘num_parts’?
dst_parts[i] = (resolvePointer(PD_BE32(src_parts[i])));
^~~~~~~~~
/home/user/perfect_dark/src/include/platform.h:52:42: note: in definition of macro ‘PD_BSWAP32’
#define PD_BSWAP32(x) __builtin_bswap32(x)
^
/home/user/perfect_dark/port/src/preprocess/filemodel.c:690:36: note: in expansion of macro ‘PD_BE32’
dst_parts[i] = (resolvePointer(PD_BE32(src_parts[i])));
^~~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:698:4: error: a label can only be part of a statement and a declaration is not a statement
struct n64_modelrodata_gundl *src_gundl = src_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:699:4: error: expected expression before ‘struct’
struct modelrodata_gundl *dst_gundl = dst_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:700:4: error: ‘dst_gundl’ undeclared (first use in this function); did you mean ‘src_gundl’?
dst_gundl->opagdl = (void *)(uintptr_t)resolvePointer(PD_BE32(src_gundl->ptr_opagdl));
^~~~~~~~~
src_gundl
/home/user/perfect_dark/port/src/preprocess/filemodel.c:718:4: error: a label can only be part of a statement and a declaration is not a statement
struct n64_modelrodata_distance *src_dist = src_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:719:4: error: expected expression before ‘struct’
struct modelrodata_distance *dst_dist = dst_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:720:4: error: ‘dst_dist’ undeclared (first use in this function); did you mean ‘src_dist’?
dst_dist->target = (void *)(uintptr_t)resolvePointer(PD_BE32(src_dist->ptr_target));
^~~~~~~~
src_dist
/home/user/perfect_dark/port/src/preprocess/filemodel.c:723:4: error: a label can only be part of a statement and a declaration is not a statement
struct n64_modelrodata_reorder *src_reorder = src_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:724:4: error: expected expression before ‘struct’
struct modelrodata_reorder *dst_reorder = dst_thing;
^~~~~~
[ 38%] Building C object CMakeFiles/pd.dir/port/src/video.c.o
/home/user/perfect_dark/port/src/preprocess/filemodel.c:725:4: error: ‘dst_reorder’ undeclared (first use in this function); did you mean ‘src_reorder’?
dst_reorder->unk18 = (void *)(uintptr_t)resolvePointer(PD_BE32(src_reorder->ptr_node_unk18));
^~~~~~~~~~~
src_reorder
/home/user/perfect_dark/port/src/preprocess/filemodel.c:729:4: error: a label can only be part of a statement and a declaration is not a statement
struct n64_modelrodata_chrgunfire *src_chrgunfire = src_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:730:4: error: expected expression before ‘struct’
struct modelrodata_chrgunfire *dst_chrgunfire = dst_thing;
^~~~~~
[ 38%] Building CXX object CMakeFiles/pd.dir/port/fast3d/gfx_cc.cpp.o
/home/user/perfect_dark/port/src/preprocess/filemodel.c:731:4: error: ‘dst_chrgunfire’ undeclared (first use in this function); did you mean ‘src_chrgunfire’?
dst_chrgunfire->texture = (void *)(uintptr_t)resolvePointer(PD_BE32(src_chrgunfire->ptr_texture));
^~~~~~~~~~~~~~
src_chrgunfire
/home/user/perfect_dark/port/src/preprocess/filemodel.c:737:4: error: a label can only be part of a statement and a declaration is not a statement
struct n64_modelrodata_toggle *src_toggle = src_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:738:4: error: expected expression before ‘struct’
struct modelrodata_toggle *dst_toggle = dst_thing;
^~~~~~
In file included from /home/user/perfect_dark/port/fast3d/gfx_cc.cpp:1:
/home/user/perfect_dark/port/fast3d/gfx_cc.h:8:10: fatal error: compare: No such file or directory
#include
^~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/pd.dir/build.make:3674: CMakeFiles/pd.dir/port/fast3d/gfx_cc.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/home/user/perfect_dark/port/src/preprocess/filemodel.c:739:4: error: ‘dst_toggle’ undeclared (first use in this function); did you mean ‘src_toggle’?
dst_toggle->target = (void *)(uintptr_t)resolvePointer(PD_BE32(src_toggle->ptr_target));
^~~~~~~~~~
src_toggle
/home/user/perfect_dark/port/src/preprocess/filemodel.c:742:4: error: a label can only be part of a statement and a declaration is not a statement
struct n64_modelrodata_stargunfire *src_stargunfire = src_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:743:4: error: expected expression before ‘struct’
struct modelrodata_stargunfire *dst_stargunfire = dst_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:744:4: error: ‘dst_stargunfire’ undeclared (first use in this function); did you mean ‘src_stargunfire’?
dst_stargunfire->vertices = (void *)(uintptr_t)resolvePointer(PD_BE32(src_stargunfire->ptr_vertices));
^~~~~~~~~~~~~~~
src_stargunfire
/home/user/perfect_dark/port/src/preprocess/filemodel.c:757:4: error: a label can only be part of a statement and a declaration is not a statement
struct n64_modelrodata_dl *src_dl = src_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:758:4: error: expected expression before ‘struct’
struct modelrodata_dl *dst_dl = dst_thing;
^~~~~~
/home/user/perfect_dark/port/src/preprocess/filemodel.c:759:4: error: ‘dst_dl’ undeclared (first use in this function); did you mean ‘src_dl’?
dst_dl->opagdl = (void *)(uintptr_t)resolvePointer(PD_BE32(src_dl->ptr_opagdl));
^~~~~~
src_dl
make[2]: *** [CMakeFiles/pd.dir/build.make:3506: CMakeFiles/pd.dir/port/src/preprocess/filemodel.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:111: CMakeFiles/pd.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

@fgsfdsfgs
Copy link
Owner

What version of gcc do you have? Use gcc -v to check. This is also not the full log.

@fgsfdsfgs fgsfdsfgs reopened this Nov 13, 2024
@FrostKnight
Copy link
Author

What version of gcc do you have? Use gcc -v to check. This is also not the full log.

It actually broke at 78%

I tried to do the command again and it stopped at 38% this time.

I have 8.4.0 version.

@fgsfdsfgs
Copy link
Owner

fgsfdsfgs commented Nov 14, 2024

That's pretty old. The game requires a couple C++20 features, which have only started appearing in 8. It's probably best to build it with at least 10. I committed a change that might at least partially fix this. Can you try again?

@FrostKnight
Copy link
Author

FrostKnight commented Nov 14, 2024

just now I did, try again, this time it got to 81%

[ 81%] Building CXX object CMakeFiles/pd.dir/port/fast3d/gfx_cc.cpp.o
In file included from /home/user/perfect_dark/port/fast3d/gfx_cc.cpp:1:
/home/user/perfect_dark/port/fast3d/gfx_cc.h:8:10: fatal error: compare: No such file or directory
#include
^~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/pd.dir/build.make:3674: CMakeFiles/pd.dir/port/fast3d/gfx_cc.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:111: CMakeFiles/pd.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

a bit better, but not quite

@fgsfdsfgs
Copy link
Owner

Yeah you don't have <compare>. Means your compiler is too old.

@FrostKnight
Copy link
Author

Yeah you don't have <compare>. Means your compiler is too old.

My bad, I guess will have to wait for the devs of my os to fix this problem.

I assume its too much trouble, hence I say this. Let me know if this is indeed correct.

@fgsfdsfgs
Copy link
Owner

fgsfdsfgs commented Nov 14, 2024

This is unfortunately not easily fixable (or to be more precise I got no goddamn clue with what to replace the <compare> usage to keep the same behavior). You could maybe build gcc9 or 10 yourself from source, though that's kind of time consuming and I probably can't help you with it.

@FrostKnight
Copy link
Author

FrostKnight commented Nov 14, 2024

This is unfortunately not easily fixable. You could maybe build gcc9 or 10 yourself from source, though that's kind of time consuming and I probably can't help you with it.

No problem, you tried. Do you think you can support clang though if nothing else?

And what would be the minimum version needed? Assuming this is possible

@fgsfdsfgs
Copy link
Owner

No problem, you tried. Do you think you can support clang though if nothing else?

I plan to. What version do you have available?

@FrostKnight
Copy link
Author

FrostKnight commented Nov 14, 2024

No problem, you tried. Do you think you can support clang though if nothing else?

I plan to. What version do you have available?

Got 11 actually, is that a problem or no.

debian buster actually has it too

@fgsfdsfgs
Copy link
Owner

I don't know. I think one thing that the code uses might've only been added in 14, but I'm not sure. We'll see when someone gets around to build it for OSX or something.

@fgsfdsfgs fgsfdsfgs changed the title Couldn't compile, Can't compile with GCC 8.4.0 Nov 14, 2024
@fgsfdsfgs fgsfdsfgs added the building issue related to compiling or packaging the game label Nov 14, 2024
@FrostKnight
Copy link
Author

FrostKnight commented Nov 16, 2024

I don't know. I think one thing that the code uses might've only been added in 14, but I'm not sure. We'll see when someone gets around to build it for OSX or something.

Ill see if I can build clang 14 or newer then. I have to update my cmake first tho

EDIT: I figured out how to build cmake, but clang 14 is impossible it seems for my system right now. I tried my best though.

I did update to cmake 3.30.5 though

Weird stuff...

I guess either you make it work on clang 11 or gcc 8.4.0 or I wait till the newer system I desire comes out.

the devs are working on a openbsd hard fork right now, the devs of my OS.

So... maybe I will use it then on this comp.

@FrostKnight
Copy link
Author

You should probably close this, if you don't have a path forward for this. I don't wish to waste your time with this.

I am wondering if this installs on any BSDs without the linux compatibility layer tho

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
building issue related to compiling or packaging the game
Projects
None yet
Development

No branches or pull requests

2 participants