Skip to content

Commit

Permalink
fix static linking
Browse files Browse the repository at this point in the history
  • Loading branch information
divolgin committed Nov 3, 2020
1 parent f9e367d commit 897a7a6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ endif

define LDFLAGS
-ldflags "\
-extldflags \"-static\" \
-X ${VERSION_PACKAGE}.version=${VERSION} \
-X ${VERSION_PACKAGE}.gitSHA=${GIT_SHA} \
-X ${VERSION_PACKAGE}.buildTime=${DATE} \
Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,12 @@ For questions about using Troubleshoot, there's a [Replicated Community](https:/
The following packages are required for building the project from source code:

pkg-config
librrd-dev
librrd-dev
libglib2.0-dev
libcairo2-dev
libpango1.0-dev
libpixman-1-dev
libpng-dev
libsdl-pango-dev
libthai-dev
libpcre3-dev
3 changes: 2 additions & 1 deletion pkg/rrd/rrd_c.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ package rrd
#include <stdlib.h>
#include <rrd.h>
#include "rrdfunc.h"
#cgo pkg-config: librrd
#cgo LDFLAGS: -lpthread -lrrd -lpng -lcairo -lpixman-1 -lpango-1.0 -lfontconfig -lssl -lexpat -lfreetype -lgobject-2.0 -lglib-2.0 -lpcre -lthai -ldatrie -lz -lffi -ldbi -ldl -lc -lm -Wl,--unresolved-symbols=ignore-all
#cgo CFLAGS: -std=c99
*/
import "C"
import (
Expand Down

0 comments on commit 897a7a6

Please sign in to comment.