hyperledger-archives / fabric

THIS IS A READ-ONLY historic repository. Current development is at https://gerrit.hyperledger.org/r/#/admin/projects/fabric . pull requests not accepted
https://gerrit.hyperledger.org/
Apache License 2.0
1.17k stars 1.01k forks source link

Fabric on RHEL 6 #2098

Open archupsg03 opened 8 years ago

archupsg03 commented 8 years ago

Description

source setupRHELz.sh script is causing the below mentioned issue

CGO_CFLAGS=" " CGO_LDFLAGS="-lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy" GOBIN=/root/git/src/github.com/hyperledger/fabric/build/bin go install github.com/hyperledger/fabric/peer

github.com/hyperledger/fabric/vendor/github.com/tecbot/gorocksdb

/tmp/go-build920606315/github.com/hyperledger/fabric/vendor/github.com/tecbot/gorocksdb/_obj/options.cgo2.o: In function _cgo_4c7b26b16232_Cfunc_rocksdb_options_set_filter_deletes': options.cgo2.c:(.text+0x892): undefined reference torocksdb_options_set_filter_deletes' /tmp/go-build920606315/github.com/hyperledger/fabric/vendor/github.com/tecbot/gorocksdb/_obj/options.cgo2.o: In function _cgo_4c7b26b16232_Cfunc_rocksdb_options_set_memtable_prefix_bloom_bits': options.cgo2.c:(.text+0xda7): undefined reference torocksdb_options_set_memtable_prefix_bloom_bits' /tmp/go-build920606315/github.com/hyperledger/fabric/vendor/github.com/tecbot/gorocksdb/_obj/options.cgo2.o: In function _cgo_4c7b26b16232_Cfunc_rocksdb_options_set_memtable_prefix_bloom_probes': options.cgo2.c:(.text+0xdd5): undefined reference torocksdb_options_set_memtable_prefix_bloom_probes'

Describe How to Reproduce

  1. Clone fabirc
  2. Run source setupRHELonZ.sh
mgamanho commented 8 years ago

I'm hitting the same issue, looks like it's caused by this.

mgamanho commented 8 years ago

Besides deprecated and removed APIs, CompressionOptions also has an extra parameter. As a workaround I've commented out the changed APIs and added the extra option to SetCompressionOptions in vendor/github.com/tecbot/gorocksdb/options.go

archupsg03 commented 8 years ago

Can you comment out here what exactly should be changed to solve the above issue

mgamanho commented 8 years ago

This is the workaround I have used. Unzip into /src/github.com/hyperledger/fabric/vendor/github.com/tecbot/gorocksdb

The commented out APIs don't seem to be used anywhere in hyperledger.

workaround.zip

archupsg03 commented 8 years ago

Thank you :). It worked

archupsg03 commented 8 years ago

With the above workaround, unit test is failing :(. Options.go mismatch of arguments

[root@jupiter-vm659 fabric]# make unit-test Building build/docker/bin/peer

github.com/hyperledger/fabric/vendor/github.com/tecbot/gorocksdb

opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/tecbot/gorocksdb/options.go:328: too many arguments in call to _Cfunc_rocksdb_options_set_compression_options make: *\ [build/docker/bin/peer] Error 2

Is there any workaround for the issue ?

Thanks in advance

bluecloudmatrix commented 8 years ago

I think you should remove the added arguments in options.go:328