Skip to content

Commit

Permalink
fix: after some changes in the library code, linked libraries must be…
Browse files Browse the repository at this point in the history
… linked explicitly
  • Loading branch information
shotonoff committed Dec 22, 2021
1 parent eded00d commit 680d126
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion go-bindings/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ SRC_DIR=$(PWD)/../src
BUILD_DIR=$(PWD)/../build
CACHE_DIR=$(PWD)/cache

CGO_LDFLAGS="-L$(BUILD_DIR)"
CGO_LDFLAGS="-L$(CACHE_DIR)/lib -lbls-dash -lrelic_s -lgmp"
CGO_CXXFLAGS="-I$(CACHE_DIR)"

GO="go"
Expand All @@ -15,6 +15,8 @@ default: prepare vet test clean
prepare:
ifeq ("$(wildcard $(CACHE_DIR))", "")
@mkdir -p $(CACHE_DIR)/bls-dash
@mkdir -p $(CACHE_DIR)/lib
@find $(BUILD_DIR) -name "*.a" -exec cp {} $(CACHE_DIR)/lib \;
@cp -r $(BUILD_DIR)/_deps/relic-src/include/* $(CACHE_DIR)
@cp -r $(BUILD_DIR)/_deps/relic-build/include/* $(CACHE_DIR)
@cp -r $(SRC_DIR)/* $(CACHE_DIR)/bls-dash
Expand Down
2 changes: 1 addition & 1 deletion go-bindings/elements.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

package blschia

// #cgo LDFLAGS: -lbls-dash
// #cgo LDFLAGS: -lbls-dash -lrelic_s -lsodium
// #cgo CXXFLAGS: -std=c++14
// #include <stdbool.h>
// #include <stdlib.h>
Expand Down
2 changes: 1 addition & 1 deletion go-bindings/privatekey.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

package blschia

// #cgo LDFLAGS: -lbls-dash
// #cgo LDFLAGS: -lbls-dash -lrelic_s -lsodium
// #cgo CXXFLAGS: -std=c++14
// #include <stdbool.h>
// #include <stdlib.h>
Expand Down
2 changes: 1 addition & 1 deletion go-bindings/schemes.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

package blschia

// #cgo LDFLAGS: -lbls-dash
// #cgo LDFLAGS: -lbls-dash -lrelic_s -lsodium
// #cgo CXXFLAGS: -std=c++14
// #include <stdbool.h>
// #include <stdlib.h>
Expand Down
2 changes: 1 addition & 1 deletion go-bindings/threshold.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

package blschia

// #cgo LDFLAGS: -lbls-dash
// #cgo LDFLAGS: -lbls-dash -lrelic_s -lsodium
// #cgo CXXFLAGS: -std=c++14
// #include <stdlib.h>
// #include "threshold.h"
Expand Down
2 changes: 1 addition & 1 deletion go-bindings/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

package blschia

// #cgo LDFLAGS: -lbls-dash
// #cgo LDFLAGS: -lbls-dash -lrelic_s -lsodium
// #cgo CXXFLAGS: -std=c++14
// #include "blschia.h"
// #include <string.h>
Expand Down

0 comments on commit 680d126

Please sign in to comment.