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

typo in header include, errnos.h should be errno.h #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

weskerfoot
Copy link

No description provided.

@lbertolotti
Copy link

lucas@lucas-K55VD:~/DOOM/linuxdoom-1.10$ sudo make
gcc   -g -Wall -DNORMALUNIX -DLINUX  -c doomdef.c -o linux/doomdef.o
gcc   -g -Wall -DNORMALUNIX -DLINUX  -c doomstat.c -o linux/doomstat.o
gcc   -g -Wall -DNORMALUNIX -DLINUX  -c dstrings.c -o linux/dstrings.o
gcc   -g -Wall -DNORMALUNIX -DLINUX  -c i_system.c -o linux/i_system.o
gcc   -g -Wall -DNORMALUNIX -DLINUX  -c i_sound.c -o linux/i_sound.o
gcc   -g -Wall -DNORMALUNIX -DLINUX  -c i_video.c -o linux/i_video.o
i_video.c:49:20: fatal error: errnos.h: No such file or directory
compilation terminated.
Makefile:91: recipe for target 'linux/i_video.o' failed
make: *** [linux/i_video.o] Error 1

@lbertolotti
Copy link

lbertolotti commented Dec 31, 2017

Correcting the errnos.h on i_video.c gives:
lucas@lucas-K55VD:~/DOOM/linuxdoom-1.10$ sudo make

gcc   -g -Wall -DNORMALUNIX -DLINUX  -c i_video.c -o linux/i_video.o
i_video.c: In function ‘xlatekey’:
i_video.c:102:5: warning: ‘XKeycodeToKeysym’ is deprecated [-Wdeprecated-declarations]
     switch(rc = XKeycodeToKeysym(X_display, X_event.xkey.keycode, 0))
     ^
In file included from i_video.c:32:0:
/usr/include/X11/Xlib.h:1687:15: note: declared here
 extern KeySym XKeycodeToKeysym(
               ^
i_video.c: In function ‘grabsharedmemory’:
i_video.c:689:4: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    (int) (image->data));
    ^
i_video.c: In function ‘Expand4’:
i_video.c:989:28: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      dpixel = *(double *)( (int)exp + ( (fourpixels&0xffff0000)>>13) );
                            ^
i_video.c:989:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
      dpixel = *(double *)( (int)exp + ( (fourpixels&0xffff0000)>>13) );
                ^
i_video.c:995:28: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      dpixel = *(double *)( (int)exp + ( (fourpixels&0xffff)<<3 ) );
                            ^
i_video.c:995:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
      dpixel = *(double *)( (int)exp + ( (fourpixels&0xffff)<<3 ) );
                ^
i_video.c:1003:28: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      dpixel = *(double *)( (int)exp + ( (fourpixels&0xffff0000)>>13) );
                            ^
i_video.c:1003:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
      dpixel = *(double *)( (int)exp + ( (fourpixels&0xffff0000)>>13) );
                ^
i_video.c:1009:28: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      dpixel = *(double *)( (int)exp + ( (fourpixels&0xffff)<<3 ) );
                            ^
i_video.c:1009:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
      dpixel = *(double *)( (int)exp + ( (fourpixels&0xffff)<<3 ) );
                ^
i_video.c:1017:28: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      dpixel = *(double *)( (int)exp + ( (fourpixels&0xffff0000)>>13) );
                            ^
i_video.c:1017:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
      dpixel = *(double *)( (int)exp + ( (fourpixels&0xffff0000)>>13) );
                ^
i_video.c:1023:28: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      dpixel = *(double *)( (int)exp + ( (fourpixels&0xffff)<<3 ) );
                            ^
i_video.c:1023:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
      dpixel = *(double *)( (int)exp + ( (fourpixels&0xffff)<<3 ) );
                ^
i_video.c:1031:28: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      dpixel = *(double *)( (int)exp + ( (fourpixels&0xffff0000)>>13) );
                            ^
i_video.c:1031:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
      dpixel = *(double *)( (int)exp + ( (fourpixels&0xffff0000)>>13) );
                ^
i_video.c:1037:28: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      dpixel = *(double *)( (int)exp + ( (fourpixels&0xffff)<<3 ) );
                            ^
i_video.c:1037:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
      dpixel = *(double *)( (int)exp + ( (fourpixels&0xffff)<<3 ) );
                ^
gcc   -g -Wall -DNORMALUNIX -DLINUX  -c i_net.c -o linux/i_net.o
i_net.c: In function ‘PacketGet’:
i_net.c:171:40: warning: pointer targets in passing argument 6 of ‘recvfrom’ differ in signedness [-Wpointer-sign]
     , (struct sockaddr *)&fromaddress, &fromlen );
                                        ^
In file included from i_net.c:30:0:
/usr/include/x86_64-linux-gnu/sys/socket.h:174:16: note: expected ‘socklen_t * restrict {aka unsigned int * restrict}’ but argument is of type ‘int *’
 extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n,
                ^
gcc   -g -Wall -DNORMALUNIX -DLINUX  -c tables.c -o linux/tables.o
gcc   -g -Wall -DNORMALUNIX -DLINUX  -c f_finale.c -o linux/f_finale.o
gcc   -g -Wall -DNORMALUNIX -DLINUX  -c f_wipe.c -o linux/f_wipe.o
gcc   -g -Wall -DNORMALUNIX -DLINUX  -c d_main.c -o linux/d_main.o
d_main.c: In function ‘D_PostEvent’:
d_main.c:153:15: warning: operation on ‘eventhead’ may be undefined [-Wsequence-point]
     eventhead = (++eventhead)&(MAXEVENTS-1);
               ^
d_main.c: In function ‘D_ProcessEvents’:
d_main.c:170:48: warning: operation on ‘eventtail’ may be undefined [-Wsequence-point]
     for ( ; eventtail != eventhead ; eventtail = (++eventtail)&(MAXEVENTS-1) )
                                                ^
d_main.c: In function ‘D_DoomMain’:
d_main.c:1122:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  statcopy = (void*)atoi(myargv[p+1]);
             ^
gcc   -g -Wall -DNORMALUNIX -DLINUX  -c d_net.c -o linux/d_net.o
d_net.c: In function ‘NetbufferSize’:
d_net.c:92:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     return (int)&(((doomdata_t *)0)->cmds[netbuffer->numtics]); 
            ^
d_net.c: In function ‘NetbufferChecksum’:
d_net.c:110:29: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     l = (NetbufferSize () - (int)&(((doomdata_t *)0)->retransmitfrom))/4;
                             ^
d_net.c: In function ‘CheckAbort’:
d_net.c:464:20: warning: operation on ‘eventtail’ may be undefined [-Wsequence-point]
        ; eventtail = (++eventtail)&(MAXEVENTS-1) ) 
                    ^
gcc   -g -Wall -DNORMALUNIX -DLINUX  -c d_items.c -o linux/d_items.o
gcc   -g -Wall -DNORMALUNIX -DLINUX  -c g_game.c -o linux/g_game.o
g_game.c: In function ‘G_DoLoadLevel’:
g_game.c:459:17: warning: comparison between ‘GameMode_t {aka enum <anonymous>}’ and ‘enum <anonymous>’ [-Wenum-compare]
   || ( gamemode == pack_tnt )
                 ^
g_game.c:460:17: warning: comparison between ‘GameMode_t {aka enum <anonymous>}’ and ‘enum <anonymous>’ [-Wenum-compare]
   || ( gamemode == pack_plut ) )
                 ^
g_game.c:495:36: warning: argument to ‘sizeof’ in ‘memset’ call is the same expression as the destination; did you mean to dereference it? [-Wsizeof-pointer-memaccess]
     memset (mousebuttons, 0, sizeof(mousebuttons)); 
                                    ^
g_game.c:496:34: warning: argument to ‘sizeof’ in ‘memset’ call is the same expression as the destination; did you mean to dereference it? [-Wsizeof-pointer-memaccess]
     memset (joybuttons, 0, sizeof(joybuttons)); 
                                  ^
g_game.c: In function ‘G_InitPlayer’:
g_game.c:763:15: warning: variable ‘p’ set but not used [-Wunused-but-set-variable]
     player_t* p; 
               ^
g_game.c: In function ‘G_DoLoadGame’:
g_game.c:1216:17: warning: pointer targets in passing argument 1 of ‘strcmp’ differ in signedness [-Wpointer-sign]
     if (strcmp (save_p, vcheck)) 
                 ^
In file included from g_game.c:27:0:
/usr/include/string.h:140:12: note: expected ‘const char *’ but argument is of type ‘byte * {aka unsigned char *}’
 extern int strcmp (const char *__s1, const char *__s2)
            ^
g_game.c:1203:10: warning: variable ‘length’ set but not used [-Wunused-but-set-variable]
     int  length; 
          ^
gcc   -g -Wall -DNORMALUNIX -DLINUX  -c m_menu.c -o linux/m_menu.o
m_menu.c: In function ‘M_ReadSaveStrings’:
m_menu.c:514:21: warning: variable ‘count’ set but not used [-Wunused-but-set-variable]
     int             count;
                     ^
gcc   -g -Wall -DNORMALUNIX -DLINUX  -c m_misc.c -o linux/m_misc.o
m_misc.c:257:48: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     {"sndserver", (int *) &sndserver_filename, (int) "sndserver"},
                                                ^
m_misc.c:257:48: error: initializer element is not constant
m_misc.c:257:48: note: (near initialization for ‘defaults[14].defaultvalue’)
m_misc.c:264:35: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     {"mousedev", (int*)&mousedev, (int)"/dev/ttyS0"},
                                   ^
m_misc.c:264:35: error: initializer element is not constant
m_misc.c:264:35: note: (near initialization for ‘defaults[16].defaultvalue’)
m_misc.c:265:37: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     {"mousetype", (int*)&mousetype, (int)"microsoft"},
                                     ^
m_misc.c:265:37: error: initializer element is not constant
m_misc.c:265:37: note: (near initialization for ‘defaults[17].defaultvalue’)
m_misc.c:288:45: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     {"chatmacro0", (int *) &chat_macros[0], (int) HUSTR_CHATMACRO0 },
                                             ^
m_misc.c:288:45: error: initializer element is not constant
m_misc.c:288:45: note: (near initialization for ‘defaults[31].defaultvalue’)
m_misc.c:289:45: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     {"chatmacro1", (int *) &chat_macros[1], (int) HUSTR_CHATMACRO1 },
                                             ^
m_misc.c:289:45: error: initializer element is not constant
m_misc.c:289:45: note: (near initialization for ‘defaults[32].defaultvalue’)
m_misc.c:290:45: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     {"chatmacro2", (int *) &chat_macros[2], (int) HUSTR_CHATMACRO2 },
                                             ^
m_misc.c:290:45: error: initializer element is not constant
m_misc.c:290:45: note: (near initialization for ‘defaults[33].defaultvalue’)
m_misc.c:291:45: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     {"chatmacro3", (int *) &chat_macros[3], (int) HUSTR_CHATMACRO3 },
                                             ^
m_misc.c:291:45: error: initializer element is not constant
m_misc.c:291:45: note: (near initialization for ‘defaults[34].defaultvalue’)
m_misc.c:292:45: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     {"chatmacro4", (int *) &chat_macros[4], (int) HUSTR_CHATMACRO4 },
                                             ^
m_misc.c:292:45: error: initializer element is not constant
m_misc.c:292:45: note: (near initialization for ‘defaults[35].defaultvalue’)
m_misc.c:293:45: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     {"chatmacro5", (int *) &chat_macros[5], (int) HUSTR_CHATMACRO5 },
                                             ^
m_misc.c:293:45: error: initializer element is not constant
m_misc.c:293:45: note: (near initialization for ‘defaults[36].defaultvalue’)
m_misc.c:294:45: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     {"chatmacro6", (int *) &chat_macros[6], (int) HUSTR_CHATMACRO6 },
                                             ^
m_misc.c:294:45: error: initializer element is not constant
m_misc.c:294:45: note: (near initialization for ‘defaults[37].defaultvalue’)
m_misc.c:295:45: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     {"chatmacro7", (int *) &chat_macros[7], (int) HUSTR_CHATMACRO7 },
                                             ^
m_misc.c:295:45: error: initializer element is not constant
m_misc.c:295:45: note: (near initialization for ‘defaults[38].defaultvalue’)
m_misc.c:296:45: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     {"chatmacro8", (int *) &chat_macros[8], (int) HUSTR_CHATMACRO8 },
                                             ^
m_misc.c:296:45: error: initializer element is not constant
m_misc.c:296:45: note: (near initialization for ‘defaults[39].defaultvalue’)
m_misc.c:297:45: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     {"chatmacro9", (int *) &chat_macros[9], (int) HUSTR_CHATMACRO9 }
                                             ^
m_misc.c:297:45: error: initializer element is not constant
m_misc.c:297:45: note: (near initialization for ‘defaults[40].defaultvalue’)
m_misc.c: In function ‘M_LoadDefaults’:
m_misc.c:395:5: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     (int) newstring;
     ^
Makefile:91: recipe for target 'linux/m_misc.o' failed
make: *** [linux/m_misc.o] Error 1

@lbertolotti
Copy link

Commenting those lines in m_misc.c gives:

lucas@lucas-K55VD:~/DOOM/linuxdoom-1.10$ sudo make
gcc   -g -Wall -DNORMALUNIX -DLINUX  -L/usr/X11R6/lib linux/doomdef.o linux/doomstat.o linux/dstrings.o linux/i_system.o linux/i_sound.o linux/i_video.o linux/i_net.o linux/tables.o linux/f_finale.o linux/f_wipe.o linux/d_main.o linux/d_net.o linux/d_items.o linux/g_game.o linux/m_menu.o linux/m_misc.o linux/m_argv.o linux/m_bbox.o linux/m_fixed.o linux/m_swap.o linux/m_cheat.o linux/m_random.o linux/am_map.o linux/p_ceilng.o linux/p_doors.o linux/p_enemy.o linux/p_floor.o linux/p_inter.o linux/p_lights.o linux/p_map.o linux/p_maputl.o linux/p_plats.o linux/p_pspr.o linux/p_setup.o linux/p_sight.o linux/p_spec.o linux/p_switch.o linux/p_mobj.o linux/p_telept.o linux/p_tick.o linux/p_saveg.o linux/p_user.o linux/r_bsp.o linux/r_data.o linux/r_draw.o linux/r_main.o linux/r_plane.o linux/r_segs.o linux/r_sky.o linux/r_things.o linux/w_wad.o linux/wi_stuff.o linux/v_video.o linux/st_lib.o linux/st_stuff.o linux/hu_stuff.o linux/hu_lib.o linux/s_sound.o linux/z_zone.o linux/info.o linux/sounds.o linux/i_main.o \
-o linux/linuxxdoom -lXext -lX11 -lnsl -lm
/usr/bin/ld: errno: TLS definition in /lib/x86_64-linux-gnu/libc.so.6 section .tbss mismatches non-TLS reference in linux/i_sound.o
/lib/x86_64-linux-gnu/libc.so.6: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile:87: recipe for target 'linux/linuxxdoom' failed
make: *** [linux/linuxxdoom] Error 1

@lbertolotti
Copy link

In file i_sound.c in place of:
extern int errno;
putting
#include <errno.h>

gives:
lucas@lucas-K55VD:~/DOOM/linuxdoom-1.10$ sudo make
gcc   -g -Wall -DNORMALUNIX -DLINUX  -c i_sound.c -o linux/i_sound.o
gcc   -g -Wall -DNORMALUNIX -DLINUX  -L/usr/X11R6/lib linux/doomdef.o linux/doomstat.o linux/dstrings.o linux/i_system.o linux/i_sound.o linux/i_video.o linux/i_net.o linux/tables.o linux/f_finale.o linux/f_wipe.o linux/d_main.o linux/d_net.o linux/d_items.o linux/g_game.o linux/m_menu.o linux/m_misc.o linux/m_argv.o linux/m_bbox.o linux/m_fixed.o linux/m_swap.o linux/m_cheat.o linux/m_random.o linux/am_map.o linux/p_ceilng.o linux/p_doors.o linux/p_enemy.o linux/p_floor.o linux/p_inter.o linux/p_lights.o linux/p_map.o linux/p_maputl.o linux/p_plats.o linux/p_pspr.o linux/p_setup.o linux/p_sight.o linux/p_spec.o linux/p_switch.o linux/p_mobj.o linux/p_telept.o linux/p_tick.o linux/p_saveg.o linux/p_user.o linux/r_bsp.o linux/r_data.o linux/r_draw.o linux/r_main.o linux/r_plane.o linux/r_segs.o linux/r_sky.o linux/r_things.o linux/w_wad.o linux/wi_stuff.o linux/v_video.o linux/st_lib.o linux/st_stuff.o linux/hu_stuff.o linux/hu_lib.o linux/s_sound.o linux/z_zone.o linux/info.o linux/sounds.o linux/i_main.o \
-o linux/linuxxdoom -lXext -lX11 -lnsl -lm
lucas@lucas-K55VD:~/DOOM/linuxdoom-1.10$ cd linux
lucas@lucas-K55VD:~/DOOM/linuxdoom-1.10/linux$ ./linuxxdoom 
Game mode indeterminate.
                     Public DOOM - v1.10                           
V_Init: allocate screens.
M_LoadDefaults: Load system defaults.
Z_Init: Init zone memory allocation daemon. 
W_Init: Init WADfiles.
Error: W_InitFiles: no files found
Segmentation fault (core dumped)

@lbertolotti
Copy link

so using a doom.wad (case sensitive) gives:

lucas@lucas-K55VD:~/DOOM/linuxdoom-1.10/linux$ ./linuxxdoom
                            DOOM Registered Startup v1.10                           
V_Init: allocate screens.
M_LoadDefaults: Load system defaults.
Z_Init: Init zone memory allocation daemon. 
W_Init: Init WADfiles.
 adding ./doom.wad
===========================================================================
                 Commercial product - do not distribute!
         Please report software piracy to the SPA: 1-800-388-PIR8
===========================================================================
M_Init: Init miscellaneous info.
R_Init: Init DOOM refresh daemon - [.Segmentation fault (core dumped)

@elmazzun
Copy link

elmazzun commented Oct 6, 2018

Launching linuxxdoom with valgrind, I got:

[.==17682== Invalid read of size 4     ]
==17682==    at 0x429DD3: R_InitTextures (r_data.c:541)
==17682==    by 0x42A274: R_InitData (r_data.c:656)
==17682==    by 0x42C325: R_Init (r_main.c:775)
==17682==    by 0x40930D: D_DoomMain (d_main.c:1095)
==17682==    by 0x439FEE: main (i_main.c:42)
==17682==  Address 0xfff011018 is not stack'd, malloc'd or (recently) free'd
==17682== 
==17682== 
==17682== Process terminating with default action of signal 11 (SIGSEGV)
==17682==  Access not within mapped region at address 0xFFF011018
==17682==    at 0x429DD3: R_InitTextures (r_data.c:541)
==17682==    by 0x42A274: R_InitData (r_data.c:656)
==17682==    by 0x42C325: R_Init (r_main.c:775)
==17682==    by 0x40930D: D_DoomMain (d_main.c:1095)
==17682==    by 0x439FEE: main (i_main.c:42)

Guilty line Invalid read of size 4 was the following one:
patch->patch = patchlookup[SHORT(mpatch->patch)];

patchlookup is allocated at r_data.c:451 in a strange way:
patchlookup = alloca (nummappatches*sizeof(*patchlookup));

Declaring patchlookup as a static int array or asking for memory with malloc was useless.
Any clue?

@ghost
Copy link

ghost commented Apr 18, 2020

Launching linuxxdoom with valgrind, I got:

[.==17682== Invalid read of size 4     ]
==17682==    at 0x429DD3: R_InitTextures (r_data.c:541)
==17682==    by 0x42A274: R_InitData (r_data.c:656)
==17682==    by 0x42C325: R_Init (r_main.c:775)
==17682==    by 0x40930D: D_DoomMain (d_main.c:1095)
==17682==    by 0x439FEE: main (i_main.c:42)
==17682==  Address 0xfff011018 is not stack'd, malloc'd or (recently) free'd
==17682== 
==17682== 
==17682== Process terminating with default action of signal 11 (SIGSEGV)
==17682==  Access not within mapped region at address 0xFFF011018
==17682==    at 0x429DD3: R_InitTextures (r_data.c:541)
==17682==    by 0x42A274: R_InitData (r_data.c:656)
==17682==    by 0x42C325: R_Init (r_main.c:775)
==17682==    by 0x40930D: D_DoomMain (d_main.c:1095)
==17682==    by 0x439FEE: main (i_main.c:42)

Guilty line Invalid read of size 4 was the following one:
patch->patch = patchlookup[SHORT(mpatch->patch)];

patchlookup is allocated at r_data.c:451 in a strange way:
patchlookup = alloca (nummappatches*sizeof(*patchlookup));

Declaring patchlookup as a static int array or asking for memory with malloc was useless.
Any clue?

See #9

@GreatAttractor
Copy link

Hi everyone,

I've been also playing with the code (building it as 64-bit) and tried to load a DOOM2.WAD from Doom 2 1.9. The above crash is rectified by changing this line in maptexture_t (r_data.c):

void        **columndirectory;    // OBSOLETE

to

int padding;

Of course, apply all the other 64-bit fixes from the other PRs.

@lbertolotti
Copy link

lucas:~/DOOM/linuxdoom-1.10$ sudo make
[sudo] password for lucas: 
gcc   -g -Wall -DNORMALUNIX -DLINUX  -c doomdef.c -o linux/doomdef.o
doomdef.c:26:1: warning: ‘rcsid’ defined but not used [-Wunused-const-variable=]
   26 | rcsid[] = "$Id: m_bbox.c,v 1.1 1997/02/03 22:45:10 b1 Exp $";
      | ^~~~~
Assembler messages:
Fatal error: can't create linux/doomdef.o: No such file or directory

@lihe07
Copy link

lihe07 commented Apr 11, 2024

lucas:~/DOOM/linuxdoom-1.10$ sudo make
[sudo] password for lucas: 
gcc   -g -Wall -DNORMALUNIX -DLINUX  -c doomdef.c -o linux/doomdef.o
doomdef.c:26:1: warning: ‘rcsid’ defined but not used [-Wunused-const-variable=]
   26 | rcsid[] = "$Id: m_bbox.c,v 1.1 1997/02/03 22:45:10 b1 Exp $";
      | ^~~~~
Assembler messages:
Fatal error: can't create linux/doomdef.o: No such file or directory

Guess you need to create a ./linux folder to save the built binaries.

@LinuxDevloper3D
Copy link

gcc -g -Wall -DNORMALUNIX -DLINUX -I.. -L/usr/X11R6/lib linux/doomdef.o linux/doomstat.o linux/dstrings.o linux/i_system.o linux/i_sound.o linux/i_video.o linux/i_net.o linux/tables.o linux/f_finale.o linux/f_wipe.o linux/d_main.o linux/d_net.o linux/d_items.o linux/g_game.o linux/m_menu.o linux/m_misc.o linux/m_argv.o linux/m_bbox.o linux/m_fixed.o linux/m_swap.o linux/m_cheat.o linux/m_random.o linux/am_map.o linux/p_ceilng.o linux/p_doors.o linux/p_enemy.o linux/p_floor.o linux/p_inter.o linux/p_lights.o linux/p_map.o linux/p_maputl.o linux/p_plats.o linux/p_pspr.o linux/p_setup.o linux/p_sight.o linux/p_spec.o linux/p_switch.o linux/p_mobj.o linux/p_telept.o linux/p_tick.o linux/p_saveg.o linux/p_user.o linux/r_bsp.o linux/r_data.o linux/r_draw.o linux/r_main.o linux/r_plane.o linux/r_segs.o linux/r_sky.o linux/r_things.o linux/w_wad.o linux/wi_stuff.o linux/v_video.o linux/st_lib.o linux/st_stuff.o linux/hu_stuff.o linux/hu_lib.o linux/s_sound.o linux/z_zone.o linux/info.o linux/sounds.o linux/i_main.o
-o linux/linuxxdoom -lXext -lX11 -lnsl -lm
/usr/bin/ld: errno: TLS definition in /lib/aarch64-linux-gnu/libc.so.6 section .tbss mismatches non-TLS reference in linux/i_sound.o
/usr/bin/ld: /lib/aarch64-linux-gnu/libc.so.6: error adding symbols: bad value
collect2: error: ld returned 1 exit status
make: *** [Makefile:87: linux/linuxxdoom] Error 1
elliot@raspbian:~/DOOM/linuxdoom-1.10 $

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

8 participants