By timbl


2015-07-10 15:56:04 8 Comments

I am pulling and installing a package with dependencies, and a compilation fails, in this case not finding a file, magic.h. How do I see what the compilation commands and flags were? The -v option does not help. (I do NOT want ideas about where to get magic.h from, this is just an example.)

$ go get -u github.com/presbrey/magicmime
# github.com/presbrey/magicmime
../../../src/github.com/presbrey/magicmime/magicmime.go:20:11: fatal error:   'magic.h' file not found
#include <magic.h>

How can I find, for example, where it was looking for include files, what source exactly it was compiling? (In this case the source file I see in $GO_PATH/src has that #include commented out, and a /usr/local/include/match.h exists anyway.)

1 comments

@Joshua 2015-07-10 16:30:47

Run go build -x on problem package:

go build -x github.com/presbrey/magicmime

@Hitz 2015-07-10 16:43:43

You just helped the man who invented WWW!

@Joshua 2015-07-10 16:50:07

the wonder of SO...

@Manoj Kumar 2018-06-18 12:59:11

Was this on stories of 10 million questions thread?

Related Questions

Sponsored Content

1 Answered Questions

[SOLVED] go test foo - cannot find package foo

  • 2018-11-30 03:30:09
  • MrCholo
  • 50 View
  • -1 Score
  • 1 Answer
  • Tags:   go

0 Answered Questions

Golang's Delve can't find packages located in parent folder

1 Answered Questions

"go run" but notice me missing .a file (I have run "go get")

  • 2016-07-19 10:41:52
  • user219031
  • 792 View
  • 3 Score
  • 1 Answer
  • Tags:   go

1 Answered Questions

2 Answered Questions

0 Answered Questions

GoQt fatal error: QAbstractAnimation :no such file or directory

  • 2017-02-24 08:28:39
  • Mikita Melnikau
  • 480 View
  • 5 Score
  • 0 Answer
  • Tags:   qt go

1 Answered Questions

[SOLVED] Golang import package error

  • 2016-12-16 18:04:03
  • Hoon
  • 383 View
  • 0 Score
  • 1 Answer
  • Tags:   go

1 Answered Questions

[SOLVED] getting "cannot find package" trying to build my application in a docker container

  • 2014-04-19 14:03:22
  • Richard
  • 3761 View
  • 6 Score
  • 1 Answer
  • Tags:   go docker

2 Answered Questions

[SOLVED] Golang compile error

1 Answered Questions

[SOLVED] Golang : /usr/local/go/src/Make.: No such file or directory

  • 2013-11-24 21:31:01
  • fred basset
  • 820 View
  • 2 Score
  • 1 Answer
  • Tags:   c++ makefile go

Sponsored Content