PoC-Consortium / Nogrod

The all-new PoCC pool software; "Fortunes are mined here"
Other
47 stars 33 forks source link

shabal64.s error: unknown directive #39

Closed chanhvq closed 5 years ago

chanhvq commented 5 years ago

Hi, it seems like my gcc can not build shabal64.s to shabal64.o

➜ goburstpool git:(master) ✗ make cd pkg/burstmath && /Library/Developer/CommandLineTools/usr/bin/make cd libs; \ cc -c -o shabal64.o shabal64.s; \ cc -c -o mshabal_sse4.o mshabal_sse4.c; \ cc -mavx2 -c -o mshabal256_avx2.o mshabal256_avx2.c; \ cc -shared -o libburstmath.a burstmath.c shabal64.o mshabal_sse4.o mshabal256_avx2.o -lpthread -std=gnu99; shabal64.s:101:2: error: unknown directive .type shabal_inner, @function ^ shabal64.s:1312:2: error: unknown directive .size shabal_inner, .-shabal_inner ^ shabal64.s:1322:2: error: unknown directive .type shabal_init, @function ^ shabal64.s:1358:2: error: unknown directive .size shabal_init, .-shabal_init ^ shabal64.s:1363:2: error: unknown directive .type iv, @object ^ shabal64.s:1589:2: error: unknown directive .size iv, .-iv ^ shabal64.s:1595:2: error: unknown directive .type reduced_memcpy, @function ^ shabal64.s:1604:2: error: unknown directive .size reduced_memcpy, .-reduced_memcpy ^ shabal64.s:1633:2: error: unknown directive .type align_structure_enter, @function ^ shabal64.s:1653:2: error: unknown directive .size align_structure_enter, .-align_structure_enter ^ shabal64.s:1671:2: error: unknown directive .type align_structure_leave, @function ^ shabal64.s:1686:2: error: unknown directive .size align_structure_leave, .-align_structure_leave ^ shabal64.s:1698:2: error: unknown directive .type shabal, @function ^ shabal64.s:1824:2: error: unknown directive .size shabal, .-shabal ^ shabal64.s:1838:2: error: unknown directive .type shabal_close, @function ^ shabal64.s:1943:2: error: unknown directive .size shabal_close, .-shabal_close ^ clang: error: no such file or directory: 'shabal64.o' make[1]: [libs] Error 1 make: [libs] Error 2 ➜ goburstpool git:(master) ✗ go version go version go1.11.2 darwin/amd64 ➜ goburstpool git:(master) ✗ gcc -v Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 9.1.0 (clang-902.0.39.2) Target: x86_64-apple-darwin17.7.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin

macOS High Sierra

spebern commented 5 years ago

could you try again? I added a flag that seems to be necessary for mac os

chanhvq commented 5 years ago

I still get the same error. Does it work well in Ubuntu 16.4 LTS? I can setup Ubuntu machine to try again in the next few days.

➜ github.com git clone https://github.com/PoC-Consortium/goburstpool.git Cloning into 'goburstpool'... remote: Enumerating objects: 1079, done. remote: Counting objects: 100% (1079/1079), done. remote: Compressing objects: 100% (838/838), done. remote: Total 1655 (delta 188), reused 1071 (delta 182), pack-reused 576 Receiving objects: 100% (1655/1655), 4.24 MiB | 1.00 MiB/s, done. Resolving deltas: 100% (493/493), done.

➜ github.com cd goburstpool

➜ goburstpool git:(master) dep init Importing configuration from glide. These are only initial constraints, and are further refined during the solve process. Importing configuration from glide. These are only initial constraints, and are further refined during the solve process. Importing configuration from glide. These are only initial constraints, and are further refined during the solve process. Using ^1.9.1 as constraint for direct dep go.uber.org/zap Locking in v1.9.1 (ff33455) for direct dep go.uber.org/zap Locking in v1.4.1 (30be604) for transitive dep github.com/klauspost/compress Using ^20180529.0.0 as constraint for direct dep github.com/valyala/fasthttp Locking in v20180529 (e5f51c1) for direct dep github.com/valyala/fasthttp Using ^2.2.4 as constraint for direct dep github.com/throttled/throttled Locking in v2.2.4 (def5708) for direct dep github.com/throttled/throttled Using ^1.2.2 as constraint for direct dep github.com/stretchr/testify Locking in v1.2.2 (f35b8ab) for direct dep github.com/stretchr/testify Using ^1.2.0 as constraint for direct dep github.com/jmoiron/sqlx Locking in v1.2.0 (d161d7a) for direct dep github.com/jmoiron/sqlx Locking in v0.5.0 (20f1fb7) for transitive dep github.com/hashicorp/golang-lru Using master as constraint for direct dep golang.org/x/net Locking in master (351d144) for direct dep golang.org/x/net Locking in master (31ac5d8) for transitive dep google.golang.org/genproto Using master as constraint for direct dep github.com/PoC-Consortium/goburstpool Locking in master (2cbd8a7) for direct dep github.com/PoC-Consortium/goburstpool Locking in v1.0.0 (e746df9) for transitive dep github.com/valyala/bytebufferpool Locking in v1.1.0 (3c49374) for transitive dep go.uber.org/multierr Locking in v1.1.1 (8991bc2) for transitive dep github.com/davecgh/go-spew Locking in v0.1.1 (477a77e) for transitive dep github.com/stretchr/objx Locking in v0.3.0 (f21a4df) for transitive dep golang.org/x/text Locking in v1.3.0 (4a4468e) for transitive dep google.golang.org/appengine Using ^1.0.0 as constraint for direct dep github.com/google/go-querystring Locking in v1.0.0 (44c6ddd) for direct dep github.com/google/go-querystring Using ^1.16.0 as constraint for direct dep google.golang.org/grpc Locking in v1.16.0 (2e463a0) for direct dep google.golang.org/grpc Locking in master (4ed8d59) for transitive dep golang.org/x/sys Using ^1.2.0 as constraint for direct dep github.com/satori/go.uuid Locking in v1.2.0 (f58768c) for direct dep github.com/satori/go.uuid Using ^1.4.0 as constraint for direct dep github.com/gorilla/websocket Locking in v1.4.0 (66b9c49) for direct dep github.com/gorilla/websocket Using ^1.2.0 as constraint for direct dep github.com/golang/protobuf Locking in v1.2.0 (aa810b6) for direct dep github.com/golang/protobuf Locking in v1.2.0 (4e33664) for transitive dep go.uber.org/atomic Using ^2.2.2 as constraint for direct dep gopkg.in/yaml.v2 Locking in v2.2.2 (51d6538) for direct dep gopkg.in/yaml.v2 Using ^1.2.0 as constraint for direct dep github.com/klauspost/cpuid Locking in v1.2.0 (e7e905e) for direct dep github.com/klauspost/cpuid Using ^1.4.1 as constraint for direct dep github.com/go-sql-driver/mysql Locking in v1.4.1 (72cd26f) for direct dep github.com/go-sql-driver/mysql Locking in v1.0.0 (792786c) for transitive dep github.com/pmezard/go-difflib Using ^3.5.4 as constraint for direct dep github.com/golang-migrate/migrate Locking in v3.5.4 (4937cd0) for direct dep github.com/golang-migrate/migrate Old vendor backed up to /Users/andrew/go/src/github.com/goburstpool/_vendor-20181201162521

➜ goburstpool git:(master) ✗ dep ensure ➜ goburstpool git:(master) ✗ make cd pkg/burstmath && /Library/Developer/CommandLineTools/usr/bin/make cd libs; \ cc -fPIC -c -o shabal64.o shabal64.s; \ cc -fPIC -c -o mshabal_sse4.o mshabal_sse4.c; \ cc -fPIC -mavx2 -c -o mshabal256_avx2.o mshabal256_avx2.c; \ cc -fPIC -shared -o libburstmath.a burstmath.c shabal64.o mshabal_sse4.o mshabal256_avx2.o -lpthread -std=gnu99; shabal64.s:101:2: error: unknown directive .type shabal_inner, @function ^ shabal64.s:1312:2: error: unknown directive .size shabal_inner, .-shabal_inner ^ shabal64.s:1322:2: error: unknown directive .type shabal_init, @function ^ shabal64.s:1358:2: error: unknown directive .size shabal_init, .-shabal_init ^ shabal64.s:1363:2: error: unknown directive .type iv, @object ^ shabal64.s:1589:2: error: unknown directive .size iv, .-iv ^ shabal64.s:1595:2: error: unknown directive .type reduced_memcpy, @function ^ shabal64.s:1604:2: error: unknown directive .size reduced_memcpy, .-reduced_memcpy ^ shabal64.s:1633:2: error: unknown directive .type align_structure_enter, @function ^ shabal64.s:1653:2: error: unknown directive .size align_structure_enter, .-align_structure_enter ^ shabal64.s:1671:2: error: unknown directive .type align_structure_leave, @function ^ shabal64.s:1686:2: error: unknown directive .size align_structure_leave, .-align_structure_leave ^ shabal64.s:1698:2: error: unknown directive .type shabal, @function ^ shabal64.s:1824:2: error: unknown directive .size shabal, .-shabal ^ shabal64.s:1838:2: error: unknown directive .type shabal_close, @function ^ shabal64.s:1943:2: error: unknown directive .size shabal_close, .-shabal_close ^ clang: error: no such file or directory: 'shabal64.o' make[1]: [libs] Error 1 make: [libs] Error 2

chanhvq commented 5 years ago

Update. cc -fPIC -c -o shabal64.o shabal64.s worked in Ubuntu 16.04 LTS.