Go-ethereum: mobile: adapt to gomobile changes

Created on 19 Oct 2017  路  2Comments  路  Source: ethereum/go-ethereum

1.7.1 is the last one that landed on maven-central. @karalabe is aware of the problem - opening this issue to collect details, keep track and add a issuETH bounty. As I cannot do it in this repo as the app is not installed here I opened a gateway issue here: https://github.com/walleth/walleth/issues/70

In file included from ../../../go/src/github.com/ethereum/go-ethereum/vendor/github.com/karalabe/hid/hid_enabled.go:36:
./hidapi/libusb/hid.c:63:3: error: typedef redefinition with different types ('struct pthread_barrier' vs 'struct pthread_barrier_t')
} pthread_barrier_t;
  ^
/home/travis/android-ndk-r14b/sysroot/usr/include/bits/pthread_types.h:53:3: note: previous definition is here
} pthread_barrier_t;
  ^
In file included from ../../../go/src/github.com/ethereum/go-ethereum/vendor/github.com/karalabe/hid/hid_enabled.go:36:
./hidapi/libusb/hid.c:72:34: error: no member named 'mutex' in 'pthread_barrier_t'
        if(pthread_mutex_init(&barrier->mutex, 0) < 0) {
                               ~~~~~~~  ^
./hidapi/libusb/hid.c:75:33: error: no member named 'cond' in 'pthread_barrier_t'
        if(pthread_cond_init(&barrier->cond, 0) < 0) {
                              ~~~~~~~  ^
./hidapi/libusb/hid.c:76:35: error: no member named 'mutex' in 'pthread_barrier_t'
                pthread_mutex_destroy(&barrier->mutex);
                                       ~~~~~~~  ^
./hidapi/libusb/hid.c:79:11: error: no member named 'trip_count' in 'pthread_barrier_t'
        barrier->trip_count = count;
        ~~~~~~~  ^
./hidapi/libusb/hid.c:80:11: error: no member named 'count' in 'pthread_barrier_t'
        barrier->count = 0;
        ~~~~~~~  ^
./hidapi/libusb/hid.c:87:33: error: no member named 'cond' in 'pthread_barrier_t'
        pthread_cond_destroy(&barrier->cond);
                              ~~~~~~~  ^
./hidapi/libusb/hid.c:88:34: error: no member named 'mutex' in 'pthread_barrier_t'
        pthread_mutex_destroy(&barrier->mutex);
                               ~~~~~~~  ^
./hidapi/libusb/hid.c:94:31: error: no member named 'mutex' in 'pthread_barrier_t'
        pthread_mutex_lock(&barrier->mutex);
                            ~~~~~~~  ^
./hidapi/libusb/hid.c:95:14: error: no member named 'count' in 'pthread_barrier_t'
        ++(barrier->count);
           ~~~~~~~  ^
./hidapi/libusb/hid.c:96:14: error: no member named 'count' in 'pthread_barrier_t'
        if(barrier->count >= barrier->trip_count)
           ~~~~~~~  ^
./hidapi/libusb/hid.c:96:32: error: no member named 'trip_count' in 'pthread_barrier_t'
        if(barrier->count >= barrier->trip_count)
                             ~~~~~~~  ^
./hidapi/libusb/hid.c:98:12: error: no member named 'count' in 'pthread_barrier_t'
                barrier->count = 0;
                ~~~~~~~  ^
./hidapi/libusb/hid.c:99:36: error: no member named 'cond' in 'pthread_barrier_t'
                pthread_cond_broadcast(&barrier->cond);
                                        ~~~~~~~  ^
./hidapi/libusb/hid.c:100:34: error: no member named 'mutex' in 'pthread_barrier_t'
                pthread_mutex_unlock(&barrier->mutex);
                                      ~~~~~~~  ^
./hidapi/libusb/hid.c:105:31: error: no member named 'cond' in 'pthread_barrier_t'
                pthread_cond_wait(&barrier->cond, &(barrier->mutex));
                                   ~~~~~~~  ^
./hidapi/libusb/hid.c:105:48: error: no member named 'mutex' in 'pthread_barrier_t'
                pthread_cond_wait(&barrier->cond, &(barrier->mutex));
                                                    ~~~~~~~  ^
./hidapi/libusb/hid.c:106:34: error: no member named 'mutex' in 'pthread_barrier_t'
                pthread_mutex_unlock(&barrier->mutex);
                                      ~~~~~~~  ^
18 errors generated.
github.com/ethereum/go-ethereum/vendor/github.com/prometheus/prometheus/util/flock
github.com/ethereum/go-ethereum/ethclient
github.com/ethereum/go-ethereum/les/flowcontrol
github.com/ethereum/go-ethereum/light
github.com/ethereum/go-ethereum/internal/debug
github.com/ethereum/go-ethereum/vendor/golang.org/x/sync/syncmap
github.com/ethereum/go-ethereum/whisper/whisperv5
/home/travis/build/ethereum/go-ethereum/build/bin/gomobile: loadExportData failed: go install -pkgdir=/home/travis/go/pkg/gomobile/pkg_android_arm -v -gcflags=-shared -ldflags=-shared github.com/ethereum/go-ethereum/mobile failed: exit status 2
util.go:44: exit status 1
exit status 1
The command "go run build/ci.go aar -signer ANDROID_SIGNING_KEY -deploy https://oss.sonatype.org -upload gethstore/builds" exited with 1.

Most helpful comment

This issue is fixed on master now. Turns out gomobile wans't compatible with NDK 14b any more. Updating to NDK 15c fixed the error.

All 2 comments

This issue is fixed on master now. Turns out gomobile wans't compatible with NDK 14b any more. Updating to NDK 15c fixed the error.

Yay - great!

Was this page helpful?
0 / 5 - 0 ratings