So trying to get mandoc compiling with MIPSPro has been hard. Mandoc itself seems to work fine, but the makewhatis script breaks down. Here's the mipspro patch I have:
Code:
diff -urnp mandoc-1.14.5/configure mandoc-1.14.5-patched/configure
*** mandoc-1.14.5/configure Sun Mar 10 05:56:43 2019
--- mandoc-1.14.5-patched/configure Sun May 31 16:30:00 2020
*************** OSENUM=
*** 41,48 ****
OSNAME=
UTF8_LOCALE=
! CC=`printf "all:\\n\\t@echo \\\$(CC)\\n" | env -i make -sf -`
! CFLAGS=
LDADD=
LDFLAGS=
LD_NANOSLEEP=
--- 41,48 ----
OSNAME=
UTF8_LOCALE=
! CC=c99
! CFLAGS='-O3 -mips3 '
LDADD=
LDFLAGS=
LD_NANOSLEEP=
diff -urnp mandoc-1.14.5/mandoc.h mandoc-1.14.5-patched/mandoc.h
*** mandoc-1.14.5/mandoc.h Sun Mar 10 05:56:43 2019
--- mandoc-1.14.5-patched/mandoc.h Sun May 31 16:25:43 2020
*************** enum mandocerr mandoc_msg_getmin(void)
*** 279,286 ****
void mandoc_msg_setmin(enum mandocerr);
enum mandoclevel mandoc_msg_getrc(void);
void mandoc_msg_setrc(enum mandoclevel);
! void mandoc_msg(enum mandocerr, int, int, const char *, ...)
! __attribute__((__format__ (__printf__, 4, 5)));
void mchars_alloc(void);
void mchars_free(void);
int mchars_num2char(const char *, size_t);
--- 279,285 ----
void mandoc_msg_setmin(enum mandocerr);
enum mandoclevel mandoc_msg_getrc(void);
void mandoc_msg_setrc(enum mandoclevel);
! void mandoc_msg(enum mandocerr, int, int, const char *, ...);
void mchars_alloc(void);
void mchars_free(void);
int mchars_num2char(const char *, size_t);
diff -urnp mandoc-1.14.5/mandoc_aux.h mandoc-1.14.5-patched/mandoc_aux.h
*** mandoc-1.14.5/mandoc_aux.h Sun Mar 10 05:56:43 2019
--- mandoc-1.14.5-patched/mandoc_aux.h Sun May 31 16:33:09 2020
***************
*** 16,23 ****
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
! int mandoc_asprintf(char **, const char *, ...)
! __attribute__((__format__ (__printf__, 2, 3)));
void *mandoc_calloc(size_t, size_t);
void *mandoc_malloc(size_t);
void *mandoc_realloc(void *, size_t);
--- 16,22 ----
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
! int mandoc_asprintf(char **, const char *, ...);
void *mandoc_calloc(size_t, size_t);
void *mandoc_malloc(size_t);
void *mandoc_realloc(void *, size_t);
I'm aware I should probably figure out how to migrate the __attribute blocks, but this is purely for testing.
The makewhatis segfaults when trying to update the mandoc.db:
Code:
root@passionlip ~/mandoc-1.14.5 % /opt/xeno/sbin/makewhatis /usr/share/man
Segmentation fault (core dumped)
root@passionlip ~/mandoc-1.14.5 % dbx /opt/xeno/sbin/makewhatis
dbx version 7.3.7 (96015_Nov16 MR) Nov 16 2004 07:34:16
Executable /opt/xeno/sbin/makewhatis
(dbx) r /usr/share/man
Process 62463 (makewhatis) started
Process 62463 (makewhatis) stopped on signal SIGSEGV: Segmentation violation (default) at [memcpy:357 ,0xfa5065c]
Source (of /xlv86/patches/7204/work/irix/lib/libc/libc_n32_M4/strings/bcopy.s) not available for Process 62463
When I have dbx show me where:
https://pastebin.com/at2SN2Ur
I have tried uninstalling that patch. it just shifts it to the same file elsewhere. I'm not sure what's going on and I don't have enough experience to know.
Halp?
I'm the system admin of this site. Private security technician, licensed locksmith, hack of a c developer and vintage computer enthusiast.
https://contrib.irixnet.org/raion/ -- contributions and pieces that I'm working on currently.
https://codeberg.org/SolusRaion -- Code repos I control
Technical problems should be sent my way.