z80svg.c:25:10: fatal error: libxml/parser.h: No such file or directory -Building Z88dk on Debian Linux

Problems installing on other platforms
Post Reply
andrewec
Member
Posts: 42
Joined: Mon Sep 09, 2024 6:28 pm

z80svg.c:25:10: fatal error: libxml/parser.h: No such file or directory -Building Z88dk on Debian Linux

Post by andrewec »

Hi,

re: Building latest nightly build of z88dk on Debian Linux: z88dk-20241004-15dcc5eb31-22885.tgz

I get the error shown below.

Code: Select all

sudo apt-get install libxml2-dev libxml2
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libxml2-dev is already the newest version (2.9.14+dfsg-1.3~deb12u1).
libxml2 is already the newest version (2.9.14+dfsg-1.3~deb12u1).
0 upgraded, 0 newly installed, 0 to remove and 146 not upgraded.
root@DESKTOP-OCJ492N:~/z88dk# sudo apt-get install libxml2-doc
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libxml2-doc is already the newest version (2.9.14+dfsg-1.3~deb12u1).
0 upgraded, 0 newly installed, 0 to remove and 146 not upgraded.
root@DESKTOP-OCJ492N:~/z88dk# make
make -C support/graphics PREFIX=`pwd` install
make[1]: Entering directory '/root/z88dk/support/graphics'
cc -O2 `pkg-config  --cflags libxml-2.0`   -c -o z80svg.o z80svg.c
/bin/sh: 1: pkg-config: not found
z80svg.c:25:10: fatal error: libxml/parser.h: No such file or directory
   25 | #include <libxml/parser.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [<builtin>: z80svg.o] Error 1
make[1]: Leaving directory '/root/z88dk/support/graphics'
make: *** [Makefile:163: bin/z88dk-z80svg] Error 2
root@xxxxx:~/z88dk#

Not sure what solution to use; Symlink? Looks like this is a good article below.
https://stackoverflow.com/questions/298 ... l-parser-h

Andrew
User avatar
dom
Well known member
Posts: 2239
Joined: Sun Jul 15, 2007 10:01 pm

Re: z80svg.c:25:10: fatal error: libxml/parser.h: No such file or directory -Building Z88dk on Debian Linux

Post by dom »

apt-get install pkg-config should help get over the error.

I'm not sure why it's not already been installed by the required dependencies. Although it's Ubuntu, the following https://github.com/z88dk/z88dk/blob/mas ... tu.yml#L32 shows what's needed.
andrewec
Member
Posts: 42
Joined: Mon Sep 09, 2024 6:28 pm

Re: z80svg.c:25:10: fatal error: libxml/parser.h: No such file or directory -Building Z88dk on Debian Linux

Post by andrewec »

Thanks, Dom for the quick reply. I will review the article and try to build it again.

Andrew
andrewec
Member
Posts: 42
Joined: Mon Sep 09, 2024 6:28 pm

Re: z80svg.c:25:10: fatal error: libxml/parser.h: No such file or directory -Building Z88dk on Debian Linux

Post by andrewec »

Code: Select all

Thank you, success :-)

.
.
.
root@xxxxx:~/z88dk/bin# ./zcc
zcc - Frontend for the z88dk Cross-C Compiler - v22885-15dcc5eb31-20241004

Usage: ./zcc +[target] {options} {files}

Options:

   -v -verbose                  Output all commands that are run (-vn suppresses)
   -h -help                     Display this text
      -o                        Set the basename for linker output files
      -specs                    Print out compiler specs
.
.
.
Andrew
Timmy
Well known member
Posts: 418
Joined: Sat Mar 10, 2012 4:18 pm

Re: z80svg.c:25:10: fatal error: libxml/parser.h: No such file or directory -Building Z88dk on Debian Linux

Post by Timmy »

You could also just check our Linux installation thread where some of us already detailed how we installed z88dk on different kinds of Linux.

https://z88dk.org/forum/viewtopic.php?t=11418 (longish thread)
andrewec
Member
Posts: 42
Joined: Mon Sep 09, 2024 6:28 pm

Re: z80svg.c:25:10: fatal error: libxml/parser.h: No such file or directory -Building Z88dk on Debian Linux

Post by andrewec »

Thanks, Timmy, I will check that too.
andrewec
Member
Posts: 42
Joined: Mon Sep 09, 2024 6:28 pm

Re: z80svg.c:25:10: fatal error: libxml/parser.h: No such file or directory -Building Z88dk on Debian Linux

Post by andrewec »

Building now with build.sh, its fun watching all the ancient retrocomputer libraries building e.g. Mattel Aquarius, etc. :-)
andrewec
Member
Posts: 42
Joined: Mon Sep 09, 2024 6:28 pm

Re: z80svg.c:25:10: fatal error: libxml/parser.h: No such file or directory -Building Z88dk on Debian Linux

Post by andrewec »

Success :-) Thanks Timmy and Dom, I appreciate all the help.

re: viewtopic.php?t=11994, windows

The same program (with a similar rom program) compiled under Windows works on my 8085 computer too when compiled under Linux.


copy code from Windows to Linux and compile the program and copy back a.rom to windows

Code: Select all

root@xxxx:~# cp /mnt/c/Users/Freya/Downloads/z88dk-win32-2.3/z88dk/monitor.c ~
root@xxxx:~# cp /mnt/c/Users/Freya/Downloads/z88dk-win32-2.3/z88dk/world.c ~
root@xxxx:~# cat monitor.c
#include <stdio.h>

int fputc_cons_native(char c) __naked
{
__asm
    pop     b  ;return address
    pop     h  ;character to print in l
    push    h
    push    b
    MOV      a,l
    MOV c,a
    call    $0006
    ret
__endasm;
}

int fgetc_cons() __naked
{
__asm
    call    $0031
    mov     l,a     ;Return the result in hl
    mvi     h,0
    ret
__endasm;
}

root@xxxx:~#zcc +z80 -clib=8085 world.c monitor.c -pragma-define:CRT_ORG_CODE=0x8000 -pragma-define:REGISTER
_SP=0xFFFE -m -create-app
root@xxxx:~# ls a*.*
a.bin  a_DATA.bin  a.map  a.rom
root@xxxx:~# ls -l a*.*
-rw-r--r-- 1 root root  1701 Oct  4 23:53 a.bin
-rw-r--r-- 1 root root     1 Oct  4 23:53 a_DATA.bin
-rw-r--r-- 1 root root 57276 Oct  4 23:53 a.map
-rw-r--r-- 1 root root  1702 Oct  4 23:53 a.rom
root@xxxx:~# cp a.rom /mnt/c/backup_c_root/Panda3D-1.10.14-x64/samples/shadows
root@xxxx:~#

burn to nvram (ram chip) in windows

Code: Select all

C:\backup_c_root\Panda3D-1.10.14-x64\samples\shadows>python program.py -d com3 -w -f a.rom
Connected to COM3 at 115200
Writing file a.rom to EEPROM
Input file size: 1702
Closed COM3
teraterm screen in windows

Code: Select all

Hello from z88dk!










<a>=97









<@>=64



Andrew
Post Reply