/usr/share/fpcsrc/3.2.2/packages/libxml/examples/reader1.pas with /lib/x86_64-linux-gnu/libxml2.so.2.9.13
## Summary <!-- Summarize the bug encountered concisely --> The package libxml is not working since Linux UBUNTU Jammy (libxml2.so.2.9.13 fpc 3.2.2) ## System Information <!-- The more information are provided the easier it is to replicate the bug --> - **Operating system:** Linux UBUNTU Jammy - **Processor architecture:** x86-64 - **Compiler version:** 3.2.2 - **Device:** Computer ``` NAME="Linux Mint" VERSION="21.2 (Victoria)" ID_LIKE="ubuntu debian" UBUNTU_CODENAME=jammy libxml2.so.2.9.13 fpc 3.2.2 Kernel: 5.15.0-92-generic x86_64 bits: 64 compiler: gcc v: 11.4.0 Desktop: Cinnamon 5.8.4 tk: GTK 3.24.33 wm: muffin vt: 7 dm: LightDM 1.30.0 Distro: Linux Mint 21.2 Victoria base: Ubuntu 22.04 jammy ``` ## Steps to reproduce <!-- How one can reproduce the issue - this is very important! --> ``` Compile a local copy of /usr/share/fpcsrc/3.2.2/packages/libxml/examples/reader1.pas this program used to test the package. Compilation ok. ``` ## Example Project <!-- If possible, please create an example project that exhibits the problematic behavior, and link to it here in the bug report. --> Execute the program reader1 with an xml file (example hyperliens-sato.xml) ``` ## Content of hyperliens-sato.xml _____________________ <?xml version="1.0"?> <TEI xmlns="http://www.tei-c.org/ns/1.0"> <teiHeader> <fileDesc> <titleStmt> <title>Procès verbaux du CIP (Législative) : ISBN 2-7384-5791-6</title> </titleStmt> <publicationStmt> <p>Liens entre les appels de note et les notes</p></publicationStmt> <sourceDesc> <p>2738457916_1corrv5_2</p></sourceDesc> </fileDesc> </teiHeader> <text type="liens"> <body> <linkGrp type="note" targFunc="NoteAppel Note"> <link target="2738457916-app01.xml#a1 2738457916-app01-ng.xml#n1"/> ... <link target="2738457916-app01.xml#a2 2738457916-app01-ng.xml#n2"/> </linkGrp> </body> </text> </TEI> --> ``` ## What is the current bug behavior? <!-- What actually happens --> I use ltrace to show the problem. ``` ltrace ./reader1 hyperliens-sato.xml __libc_start_main(0x401260, 2, 0x7ffe7e0d3668, 0x401320 <unfinished ...> xmlMemSetup(0x427420, 0x427430, 0x427450, 0x427470) = 0 xmlCheckVersion(0x5098, 0x7f7d58b49610, 0x427450, 0x427470 <no return ...> --- SIGFPE (Floating point exception) --- Runtime error 207 at $00007F7D589C9723 dladdr(0x7f7d589c9723, 0x7ffe7e0d2b70, 0, 0x7ffe7e0d2b90) = 1 $00007F7D589C9723 +++ exited (status 207) +++ --> ``` ## What is the expected (correct) behavior? <!-- What you should see instead --> I used the same procedure with Kernel: 5.4.0-70-generic x86_64 bits: 64 compiler: gcc v: 9.4.0 Desktop: Hfce 4.16.0 Distro: Linux Mint 20.3 Una; base: Ubuntu 20.04 focal The library is libxml2.so.2.9.10 fpc 3.04 Here the result without ltrace ``` ./reader1 hyperliens-sato.xml 0 1 TEI 0 0 1 14 #text 0 1 \n 1 1 teiHeader 0 0 2 14 #text 0 1 \n 2 1 fileDesc 0 0 3 14 #text 0 1 \n 3 1 titleStmt 0 0 4 14 #text 0 1 \n 4 1 title 0 0 5 3 #text 0 1 Procès verbaux du CIP (Législative) : ...\n 4 15 title 0 0 4 14 #text 0 1 \n 3 15 titleStmt 0 0 3 14 #text 0 1 \n 3 1 publicationStmt 0 0 4 14 #text 0 1 \n 4 1 p 0 0 5 3 #text 0 1 Liens entre les appels de note et les no...\n 4 15 p 0 0 3 15 publicationStmt 0 0 3 14 #text 0 1 \n 3 1 sourceDesc 0 0 4 14 #text 0 1 \n 4 1 p 0 0 5 3 #text 0 1 2738457916_1corrv5_2\n 4 15 p 0 0 3 15 sourceDesc 0 0 3 14 #text 0 1 \n 2 15 fileDesc 0 0 2 14 #text 0 1 \n 1 15 teiHeader 0 0 1 14 #text 0 1 \n 1 1 text 0 0 2 14 #text 0 1 \n 2 1 body 0 0 3 14 #text 0 1 \n 3 1 linkGrp 0 0 4 14 #text 0 1 \n 4 1 link 1 0 4 14 #text 0 1 \n 4 8 #comment 0 1 ... \n 4 14 #text 0 1 \n 4 1 link 1 0 4 14 #text 0 1 \n 3 15 linkGrp 0 0 3 14 #text 0 1 \n 2 15 body 0 0 2 14 #text 0 1 \n 1 15 text 0 0 1 14 #text 0 1 \n 0 15 TEI 0 0 ``` ## Relevant logs and/or screenshots <!-- Paste any relevant logs - please use code blocks (```) to format console output, logs, and code, as it's very hard to read otherwise. You can also use syntax highlighting for Pascal with: ```pascal the code``` For more information see https://docs.gitlab.com/ee/user/markdown.html --> ## Possible fixes <!-- If you can, link to the line of code that might be responsible for the problem --> ``` Unit xml2 is old. We can read { Translation of the libxml2 headers for FreePascal Copyright (C) 2008 by Ivo Steinmann } Thank you. ```
issue