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

include stdlib.h in xpath/expression.go #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KasparWinckler
Copy link

Hello,
Thank you for maintaining gokogiri.
gokogiri is included in code that I want to cross compile.
Cross compilation of xpath/expression.go fails with the error "could not determine kind of name for C.free".
Including stdlib.h in xpath/expression.go solves the problem.
I am not aware of an other way to solve the problem.
Thank you for your help with this matter.

@adamdecaf
Copy link

@jbowtie could we get this merged if it's acceptable?

@jbowtie
Copy link
Owner

jbowtie commented Mar 8, 2024

I have no problem with merging this, I just haven't had time to update the 5-year-old build pipeline to do a proper release.

@adamdecaf
Copy link

After adding a go.mod file there's just one compile error. Do you know what to do?

$ gotest ./... 
# github.com/moovweb/rubex
chelper.c:26:11: error: call to undeclared function 'onig_new_default'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
chelper.c:26:11: note: did you mean 'onig_new_deluxe'?
/usr/local/include/oniguruma.h:822:5: note: 'onig_new_deluxe' declared here
chelper.c:159:43: warning: passing 'const OnigUChar *' (aka 'const unsigned char *') to parameter of type 'const char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_string.h:128:34: note: expanded from macro 'strncpy'
# github.com/jbowtie/gokogiri/xpath.test

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

Successfully merging this pull request may close these issues.

3 participants