Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

https://github.com/lestrrat-go/libxml2/blob/master/clib/clib.go Package Build is failing with "could not determine kind of name for C.free" #101

Open
Priyankasoni037 opened this issue Jun 4, 2024 · 4 comments
Assignees

Comments

@Priyankasoni037
Copy link

Priyankasoni037 commented Jun 4, 2024

This happens after the last change has been made for this repo.
b65cd51

Before that it was working as expected

Describe the bug
While downloading the below package
https://github.com/lestrrat-go/libxml2/blob/master/clib/clib.go
Getting the Error message as "could not determine kind of name for C.free"
336443708-bd21517a-19c2-4145-8c1e-8d416fb93113

To Reproduce / Expected behavior

@lestrrat
Copy link
Collaborator

lestrrat commented Jun 4, 2024

I can't reproduce it. Just a guess but perhaps you are using an old Go version?

@Priyankasoni037
Copy link
Author

It fails with the same error with the latest GO version as well Go 1.22.4
image (4)

@lestrrat
Copy link
Collaborator

lestrrat commented Jun 5, 2024

Bummer. But since I can't reproduce it, I can't do much. Please provide a reproducible scenario.

@nobuenhombre
Copy link

This happens after the last change has been made for this repo. b65cd51

Before that it was working as expected

Describe the bug While downloading the below package https://github.com/lestrrat-go/libxml2/blob/master/clib/clib.go Getting the Error message as "could not determine kind of name for C.free" 336443708-bd21517a-19c2-4145-8c1e-8d416fb93113

To Reproduce / Expected behavior

I also have a similar problem

How did I solve it?

  1. Install required system packages
    for Ubuntu
    sudo apt install icu-devtools libicu-dev

for Docker
`FROM golang:alpine as builder

RUN apk update && apk add --update --no-cache
ca-certificates
gcc
musl-dev
libxml2
libxml2-dev
icu
icu-dev`

  1. In command to build executable add special flag
    CGO_CFLAGS="-I/usr/include/unicode"

That's all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants