Post by ohmygravy on Dec 24, 2023 11:45:07 GMT -5
Been spending the last day or so working on getting this going. Wasn't sure if anyone else was. I'm trying to get it running in an ubuntu docker (though ideally I'd eventually get it working in Alpine) and I've ran into some issues - one of which I may have managed to solve though I'm suspicious it won't.
I'm getting the same issue in ubuntu and cygwin. I don't think dos2unix is the issue since I've run it on all files as well as only been editing with vim.
Kind of hoping it's that I've got a jacked up copy of it.
First issue that I *may* have solved:
To solve this I pc_file.h
Then I put
in pc_file_game.c, my thinking being (and I'm not a coder, I'm a networking guy) that it's an issue with the SRC line in the makefile just using wildcards so the compile order was the issue.
That at least allows it to compile.
My current issue is this happens when I launch armSolo in either ubuntu or cygwin.
Running dos2unix on lib/data_files/races doesn't fix it.
What I noticed is that if I change the start of this line in races for Silt Horrors from 1903 to -1 it gives me the same error but for jozhals, who also have a line that starts with a number other than -1.
I know a few people were at one point trying to get this going so I'm just hoping (possibly in vain) that someone has either solved this or has a better version of armsolo.
Otherwise, I'm gonna have to keep trying to troubleshoot and learn more about fread_string().
I'm getting the same issue in ubuntu and cygwin. I don't think dos2unix is the issue since I've run it on all files as well as only been editing with vim.
Kind of hoping it's that I've got a jacked up copy of it.
First issue that I *may* have solved:
gcc -std=gnu99 -g3 -fshort-enums -c -o wagon_save.o wagon_save.c
gcc -std=gnu99 -g3 -fshort-enums -c -o watch.o watch.c
gcc -std=gnu99 -g3 -fshort-enums -c -o weather.o weather.c
gcc -o armSolo barter.o board.o buffer.o clan_relations.o clans.o cmd_getopt.o combat.o comm.o constants.o craft.o db.o db_file.o delay.o dictionary.o disease.o dmpl.o economy.o event.o files.o forage.o gmenu.o handler.o history.o immortal.o info.o io_thread.o light.o limits.o list.o magick.o mcreation.o memory.o modify.o monitor.o mount.o movement.o npc.o object.o object_list.o ocreation.o other.o parser.o pather.o pc_file_game.o pc_file_raw.o playable.o player_accounts.o plyr_list.o psionics.o rcreation.o show_menu.o signals.o skills.o smells.o social.o socket.o sp_parser.o special.o special_js.o spells.o spice.o stringutils.o threads.o utility.o wagon_save.o watch.o weather.o -rdynamic -lm -lpthread
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: monitor.o:/home/ohboy/arm/pc_file.h:66: multiple definition of `current'; immortal.o:/home/ohboy/arm/pc_file.h:66: first defined here
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: mount.o:/home/ohboy/arm/pc_file.h:66: multiple definition of `current'; immortal.o:/home/ohboy/arm/pc_file.h:66: first defined here
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: parser.o:/home/ohboy/arm/pc_file.h:66: multiple definition of `current'; immortal.o:/home/ohboy/arm/pc_file.h:66: first defined here
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: pc_file_game.o:/home/ohboy/arm/pc_file.h:66: multiple definition of `current'; immortal.o:/home/ohboy/arm/pc_file.h:66: first defined here
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: pc_file_raw.o:/home/ohboy/arm/pc_file.h:66: multiple definition of `current'; immortal.o:/home/ohboy/arm/pc_file.h:66: first defined here
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: wagon_save.o:/home/ohboy/arm/pc_file.h:66: multiple definition of `current'; immortal.o:/home/ohboy/arm/pc_file.h:66: first defined here
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: watch.o:/home/ohboy/arm/pc_file.h:66: multiple definition of `current'; immortal.o:/home/ohboy/arm/pc_file.h:66: first defined here
collect2: error: ld returned 1 exit status
make: *** [makefile:19: armSolo] Error 1
To solve this I pc_file.h
Changed this line:
to an extern:
struct char_file_data current;
to an extern:
extern struct char_file_data current;
Then I put
struct char_file_data current;
in pc_file_game.c, my thinking being (and I'm not a coder, I'm a networking guy) that it's an issue with the SRC line in the makefile just using wildcards so the compile order was the issue.
That at least allows it to compile.
My current issue is this happens when I launch armSolo in either ubuntu or cygwin.
Sun Dec 24 08:40:57 2023: Starting skin data for -1 -1 -1
Elf race 2
Sun Dec 24 08:40:57 2023: Starting skin data for -1 -1 -1
Dwarf race 3
Sun Dec 24 08:40:57 2023: Starting skin data for -1 -1 -1
Mantis race 4
Sun Dec 24 08:40:57 2023: Starting skin data for -1 -1 -1
Silt Horror race 5
fread_string(), fgets indicated premature feof()
Running dos2unix on lib/data_files/races doesn't fix it.
What I noticed is that if I change the start of this line in races for Silt Horrors from 1903 to -1 it gives me the same error but for jozhals, who also have a line that starts with a number other than -1.
Mantis~
Mnt~
STRENGTH: 3d4+8 AGILITY: 3d4+6 WISDOM: 3d4+6 ENDURANCE: 2d4+13
5 5 15
2d3+1
3 24 305
-1 -1 -1 -1 -1
Silt Horror~
Slh~
STRENGTH: 1d4+20 AGILITY: 3d4+2 WISDOM: 1d4+0 ENDURANCE: 1d4+20
40 30 30
1d8+0
0 100 307
1903 -1 -1 -1 -1
You cut a section of $p's shell away in the shape of a breast plate.~
$n cuts a section of $p's shell away in the shape of a breast plate.~
I know a few people were at one point trying to get this going so I'm just hoping (possibly in vain) that someone has either solved this or has a better version of armsolo.
Otherwise, I'm gonna have to keep trying to troubleshoot and learn more about fread_string().