DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 11th January 2022
lea0342 lea0342 is offline
Port Guard
 
Join Date: Sep 2017
Posts: 21
Default Making doom wads with BSP 5.2?

Hi! i managed to compile "slige" a random map generator for doom 1 and doom 2, but it outputs a file that need to be processed with "bsp" a node builder to get a playable map or map set.

The issue is that i can compile both applications under OpenBSD 7.0 -current, but bsp is throwing me an error i can't understand.

I compiled slige like this:
## Compile slige

Code:
$ mkdir -p ~/src/xwadtools && cd /src/xwadtools && curl -O ftp://ftp.fu-berlin.de/pc/games/idgames/source/xwadtools-20010615.tar.gz && tar -xzvf xwadtools-20010615.tar.gz
$ cp -r ~/src/xwadtools/slige ~/src/ && cd ~/src/slige
$ cc slige.c -o slige
then, i compiled bsp like this:
Code:
$ mkdir -p ~/src/bsp && cd ~/src/bsp && curl -O http://games.moria.org.uk/doom/bsp/download/bsp-5.2.tar.bz2 && tar -xjvf bsp-5.2.tar.bz2 && cd bsp-5.2
$ ./configure && make
then i run slige successfully:
Code:
$ ~/src/slige/slige -config ~/games/doom/tools/slige/slige490/slige.cfg -doom2 -levels 8 -rooms 18 -map1 -nocustom ~/games/doom/wads/slige/slige_doom2.out
but when i process that slige_doom2.out file with bsp i get:
Code:
$ /home/lea/src/bsp/bsp-5.2/bsp /home/lea/games/doom/wads/slige/slige_doom2.out -o /home/lea/games/doom/wads/slige/slige_doom2.wad

* Doom BSP node builder ver 5.2
Copyright (c)   1998 Colin Reed, Lee Killough
                2001 Simon Howard
                2000,2001,2002,2006 Colin Phipps <cph@moria.org.uk>

Opened PWAD file: /home/lea/games/doom/wads/slige/slige_doom2.out. 49 dir entries at 0x00045c2c.
Creating nodes using tunable factor of 17

Program Error: *** Unable to read wad directory entry ".       " in X
 ***
Any ideas as to why bsp is not working with that 'Unable to read wad directory entry ". " in X' error?
Reply With Quote
  #2   (View Single Post)  
Old 11th January 2022
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,636
Default

Welcome back! Since this application is not in the ports tree, you're on-your-own for debugging its source code.

Several things to consider, in no particular order:
  • From what I can gather from your post, you're running a "configure" step. It is possible that this build needs GNU make rather than BSD make, though usually this is indicated by a build failure rather than the runtime failure you reported here. If needed, install and use gmake.
  • There may be missing run dependencies. The log/logs from your configure step may shed light on this.
  • Use a debugger to step through the program and perhaps discover the root cause of the issue. The GNU debugger gdb(1) in-base is not helpful for third party applications; it dates from 2004; so either use the clang lldb(1) debugger or install the gdb package -- its executable is named egdb to avoid confusion with the in-base gdb(1).
Reply With Quote
  #3   (View Single Post)  
Old 13th January 2022
Prevet Prevet is offline
Package Pilot
 
Join Date: Oct 2017
Posts: 202
Default

I got it working. You have to change this file:

include/strfunc.h

Change this:
#if !defined(linux) && !defined(__CYGWIN32__) && !defined(MSDOS) && !defined(__sun)
int strcasecmp (const char *, const char *);
int strncasecmp (const char *, const char *, int);
#endif

to this:
#if !defined(__OpenBSD__) && !defined(linux) && !defined(__CYGWIN32__) && !defined(MSDOS) && !defined(__sun)
int strcasecmp (const char *, const char *);
int strncasecmp (const char *, const char *, int);
#endif

Change this:
void strlcat (char *, const char *);


to this:
#if !defined(__OpenBSD__)
void strlcat (char *, const char *);
#endif

Don't forget to install gmake and use gmake instead of make to build in each directory.

I tried doing a global build for all of the programs and it is listing a few bug warnings and function defintions that need to be hidden using the !defined(__OpenBSD__) directive.

To see that you can copy the Makefile.lin to Makefile.obsd then:

Change
CC = gcc
to
CC = egcc

Change:
MAKE = make
to
MAKE = gmake

The instructions to make it are in the INSTALL file.

Last edited by Prevet; 13th January 2022 at 01:43 PM.
Reply With Quote
Reply

Tags
compile, doom, games, openbsd

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
making many partitions jgisme FreeBSD Installation and Upgrading 1 23rd August 2012 06:27 PM
making STDERR more visible vermaden Off-Topic 5 18th December 2011 10:39 AM
Making your own Distro SL6-A2000 FreeBSD General 4 22nd August 2011 01:50 PM
Z-410: How ZFS is slowly making its way to Mac OS X J65nko News 0 18th March 2011 08:10 PM
[Help] Making the desktop in [BSD 7.0] seadog109 FreeBSD General 15 9th May 2008 05:10 AM


All times are GMT. The time now is 05:29 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick