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

Issues with installing fedramp-templater #64

Open
chelseacarter29 opened this issue Aug 15, 2019 · 4 comments
Open

Issues with installing fedramp-templater #64

chelseacarter29 opened this issue Aug 15, 2019 · 4 comments

Comments

@chelseacarter29
Copy link

I'm trying to install the Fedramp-Templater. I've gone through all of the related issues I can find to install errors at this point, and I'm still getting the same messages time and time again. I am getting hung up on the libxml file - I've dug through archives of libxml, and I cannot find a way to download this (as far as I can see very old) compiler to my Mac (running Mojave 10.14.6). Any suggestions on how to solve?

I've tried this

  • I have libxml2 v. 2.9.9_2
  • I have pkg-config installed
  • The suggestion to use apple-gcc42 appears to be only possible on old Macs

I'm at a loss because it seems many of the dependencies are outdated. Is there another approach I can take?

(base) Chelseas-MacBook-Pro:/ chelseacarter$ go get github.com/moovweb/gokogiri
# github.com/moovweb/gokogiri/help
Users/chelseacarter/go/src/github.com/moovweb/gokogiri/help/help.go:6:10: fatal error: 'libxml/tree.h' file not found
#include <libxml/tree.h>
         ^~~~~~~~~~~~~~~
1 error generated.
# github.com/moovweb/gokogiri/xpath
Users/chelseacarter/go/src/github.com/moovweb/gokogiri/xpath/expression.go:4:10: fatal error: 'libxml/xpath.h' file not found
#include <libxml/xpath.h>
         ^~~~~~~~~~~~~~~~
1 error generated.
@minsikl
Copy link

minsikl commented Aug 23, 2019

I got the same error on my OSX.
after applying the following command, I was able to build the code.

export LDFLAGS="-L/usr/local/opt/libxml2/lib"
export CPPFLAGS="-I/usr/local/opt/libxml2/include"
export PKG_CONFIG_PATH="/usr/local/opt/libxml2/lib/pkgconfig"

I referred to remacs/remacs#886

@chelseacarter29
Copy link
Author

Thank you! I think this helped a bit. Sadly - Now I am running into this issue (for which there may be an unmerged fix).

I was able to install gokogiri from another branch, which did not give any error messages.

Unfortunately, I am getting the same error when I progress on to the FedRAMP Templater:

(base) Chelseas-MacBook-Pro:~ chelseacarter$ go get github.com/opencontrol/fedramp-templater
# github.com/opencontrol/fedramp-templater/vendor/github.com/jbowtie/gokogiri/xml
go/src/github.com/opencontrol/fedramp-templater/vendor/github.com/jbowtie/gokogiri/xml/document.go:330:19: identifier "_Ctype_struct__xmlDoc" may conflict with identifiers generated by cgo

Any other thoughts on how to progress?

@jpmonge86
Copy link

@minsikl, I believe this did work on your end right?, do you happen to know what causes this?
Thanks again!

@minsikl
Copy link

minsikl commented Aug 27, 2019

Please open the file go/src/github.com/opencontrol/fedramp-templater/vendor/github.com/jbowtie/gokogiri/xml/document.go and replace *_Ctype_struct__xmlDoc to *C.xmlDoc. Then go get github.com/opencontrol/fedramp-templater will work.
I referred to https://github.com/moovweb/gokogiri/pull/97/files

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