Giter VIP home page Giter VIP logo

Comments (8)

lestrrat avatar lestrrat commented on June 30, 2024

I'm not much of an expert around this, but one thing I suspect is that libxml2 was not installed with /usr/include ?

What does pkg-config --libs libxml2 tell you?

from libxml2.

hans-m-song avatar hans-m-song commented on June 30, 2024

Here is the output:

# pkg-config --libs libxml2
Package libxml2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libxml2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libxml2' found

I take it you are expecting libxml2 instead of libxml-2.0?

When building with -x

# go build -x
WORK=/tmp/go-build3518064176
mkdir -p $WORK/b003/
cd /root/go/pkg/mod/github.com/lestrrat/[email protected]/clib
pkg-config --cflags -- libxml-2.0
pkg-config --libs -- libxml-2.0
TERM='dumb' CGO_LDFLAGS='"-g" "-O2" "-lxml2"' /usr/local/go/pkg/tool/linux_amd64/cgo -objdir $WORK/b003/ -importpath github.com/lestrrat/go-libxml2/clib -- -I/usr/include/libxml2 -I $WORK/b003/ -g -O2 ./clib.go
# github.com/lestrrat/go-libxml2/clib
In file included from /usr/include/libxml2/libxml/parser.h:810,
                 from /usr/include/libxml2/libxml/HTMLparser.h:16,
                 from /root/go/pkg/mod/github.com/lestrrat/[email protected]/clib/clib.go:28:
/usr/include/libxml2/libxml/encoding.h:28:10: fatal error: iconv.h: No such file or directory
   28 | #include <iconv.h>
      |          ^~~~~~~~~
compilation terminated.

It references /usr/include/libxml2 which I can verify does contain header files

from libxml2.

lestrrat avatar lestrrat commented on June 30, 2024

Oh, now that I think about it, did you install libxml2-dev or libxml2-devel or whatever it is?

from libxml2.

hans-m-song avatar hans-m-song commented on June 30, 2024

Yes I have, if you have a look at the Dockerfile, I have installed

  • pkg-config
  • gcc-mingw-w64 for cross-compilation
  • libc6, libc6-dev which I believe contains libiconv
  • libxml2, libxml2-dev

from libxml2.

lestrrat avatar lestrrat commented on June 30, 2024

Oh, hmm... sorry now I'm stumped. :/

from libxml2.

hans-m-song avatar hans-m-song commented on June 30, 2024

No worries, I figured it's not really an issue with your package (which I have found quite useful, thanks for that!). I will keep digging. Feel free to close this.

from libxml2.

github-actions avatar github-actions commented on June 30, 2024

This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 7 days.

from libxml2.

github-actions avatar github-actions commented on June 30, 2024

This issue was closed because it has been stalled for 7 days with no activity. This does not mean your issue is rejected, but rather it is done to hide it from the view of the maintains for the time being. Feel free to reopen if you have new comments

from libxml2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.