Building from source: error in compilation
Closed this issue · 5 comments
Hi,
I works on WIndows 10 and I tried to install your validation tool on my laptop. I followed all steps in section Buiding from source and installed all dependencies (make, libxml2, pkg-config, gcc). But at the end, when I executed this command below:
go run cmd\file.go cmd\mqtt.go cmd\root.go cmd\server.go cmd\session.go cmd\static_dir.go cmd\validate.go validate -i testdata
I had have this message below:
# github.com/lestrrat-go/libxml2/clib
fork\libxml2\clib\clib.go:5:10: fatal error: libxml/parserInternals.h: No such file or directory
5 | #include <libxml/parserInternals.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Have you a solution to debug this ?
Best regards,
Alban GOUGOUA
Data Analyst in French Transport Regulatory Body (ART - Autorité de Régulaton des Transports)
Hi @lekotros, the last version of this tool works on Windows 10 now ?
Thanks in advance for your answer.
Best regards,
Alban GOUGOUA
Senior Data Analyst in French Transport Regulatory Body (ART - Autorité de Régulaton des Transports)
It works but we need to update the documentation. We are working on a version 1.0 that will be released by the end of April.
The documentation will be updated to match that version.
Both tool and documentation are updated
Hi @pkvarnfors,
After the update, I have tested DATA4PTTools on my local computer (system = Windows) and I have always the same issue.
Command input
go run cmd\file.go cmd\profile.go cmd\root.go cmd\script.go cmd\server.go cmd\session.go cmd\static_dir.go cmd\validate.go validate -i .\testdata\
Output
# github.com/concreteit/greenlight/xml
In file included from xml\schema.go:5:
././lxml.h:1:10: fatal error: libxml/parser.h: No such file or directory
1 | #include <libxml/parser.h>
| ^~~~~~~~~~~~~~~~~
compilation terminated.
Can you help me please ?
Best regards,
Alban GOUGOUA
Data Analyst in French Transport Regulatory Body (ART - Autorité de Régulaton des Transports)
Hi!
It looks like you are missing the library for LibXML. It is more tricky to get it to work under Windows than on Linux/MacOs. You can use the links provided in the documentation to get the source code and build the library yourself or download a precompiled version. Another way is to use WSL (Windows Subsystems for Linux) and run the Linux version of the tool.