flashmob / go-guerrilla

Mini SMTP server written in golang
MIT License
2.79k stars 366 forks source link

can't build -- iconv.h: No such file or directory #97

Closed sequentialread closed 6 years ago

sequentialread commented 6 years ago

Linux Mint 18.2 64 bit


 ~/Desktop/GOPATH/src/github.com/flashmob/go-guerrilla $ glide install
[INFO]  Downloading dependencies. Please wait...
[INFO]  --> Found desired version locally github.com/asaskevich/EventBus 52a0dcfcbd8299da13aad44b96a6642dd79cbb08!
[INFO]  --> Found desired version locally github.com/garyburd/redigo 8873b2f1995f59d4bcdd2b0dc9858e2cb9bf0c13!
[INFO]  --> Found desired version locally github.com/go-sql-driver/mysql a0583e0143b1624142adab07e0e97fe106d99561!
[INFO]  --> Found desired version locally github.com/inconshreveable/mousetrap 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75!
[INFO]  --> Found desired version locally github.com/Sirupsen/logrus ba1b36c82c5e05c4f912a88eab0dcd91a171688f!
[INFO]  --> Found desired version locally github.com/spf13/cobra b62566898a99f2db9c68ed0026aa0a052e59678d!
[INFO]  --> Found desired version locally github.com/spf13/pflag 25f8b5b07aece3207895bf19f7ab517eb3b22a40!
[INFO]  --> Found desired version locally golang.org/x/sys 478fcf54317e52ab69f40bb4c7a1520288d7f7ea!
[INFO]  --> Found desired version locally gopkg.in/iconv.v1 16a760eb7e186ae0e3aedda00d4a1daa4d0701d8!
[INFO]  Setting references.
[INFO]  --> Setting version for github.com/garyburd/redigo to 8873b2f1995f59d4bcdd2b0dc9858e2cb9bf0c13.
[INFO]  --> Setting version for github.com/spf13/pflag to 25f8b5b07aece3207895bf19f7ab517eb3b22a40.
[INFO]  --> Setting version for github.com/asaskevich/EventBus to 52a0dcfcbd8299da13aad44b96a6642dd79cbb08.
[INFO]  --> Setting version for github.com/Sirupsen/logrus to ba1b36c82c5e05c4f912a88eab0dcd91a171688f.
[INFO]  --> Setting version for github.com/inconshreveable/mousetrap to 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75.
[INFO]  --> Setting version for github.com/spf13/cobra to b62566898a99f2db9c68ed0026aa0a052e59678d.
[INFO]  --> Setting version for github.com/go-sql-driver/mysql to a0583e0143b1624142adab07e0e97fe106d99561.
[INFO]  --> Setting version for golang.org/x/sys to 478fcf54317e52ab69f40bb4c7a1520288d7f7ea.
[INFO]  --> Setting version for gopkg.in/iconv.v1 to 16a760eb7e186ae0e3aedda00d4a1daa4d0701d8.
[INFO]  Exporting resolved dependencies...
[INFO]  --> Exporting github.com/garyburd/redigo
[INFO]  --> Exporting github.com/Sirupsen/logrus
[INFO]  --> Exporting github.com/asaskevich/EventBus
[INFO]  --> Exporting github.com/go-sql-driver/mysql
[INFO]  --> Exporting github.com/inconshreveable/mousetrap
[INFO]  --> Exporting github.com/spf13/pflag
[INFO]  --> Exporting github.com/spf13/cobra
[INFO]  --> Exporting golang.org/x/sys
[INFO]  --> Exporting gopkg.in/iconv.v1
[INFO]  Replacing existing vendor dependencies

~/Desktop/GOPATH/src/github.com/flashmob/go-guerrilla $ make guerrillad
go build -o="guerrillad" -ldflags="-X github.com/flashmob/go-guerrilla.Version=1.5.1-62-g6f895c6 -X github.com/flashmob/go-guerrilla.Commit=6f895c6315311f00c621b39d5f322ecd578f7fae -X github.com/flashmob/go-guerrilla.BuildTime=2018-01-05_13:50:55_-0600" github.com/flashmob/go-guerrilla/cmd/guerrillad
# github.com/flashmob/go-guerrilla/vendor/gopkg.in/iconv.v1
vendor/gopkg.in/iconv.v1/iconv.go:9:20: fatal error: iconv.h: No such file or directory
 // #include <iconv.h>
                    ^
compilation terminated.
Makefile:25: recipe for target 'guerrillad' failed
make: *** [guerrillad] Error 2
sequentialread commented 6 years ago

For me this issue was fixed with sudo apt-get install g++

flashmob commented 6 years ago

Thanks! FYI, perhaps this was all that was required:

sudo apt-get install libc6-dev

as the inconv library headers are part of the GNU library. Source: https://askubuntu.com/questions/898826/why-is-there-no-libiconv-package-in-ubuntu