Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

constants.go #12

Closed
briannadeau opened this issue Jun 23, 2014 · 6 comments
Closed

constants.go #12

briannadeau opened this issue Jun 23, 2014 · 6 comments

Comments

@briannadeau
Copy link

Hi, I have the same issue that was reported prior ---

# github.com/bemasher/fftw
constants.go:61[/tmp/go-build773017412/github.com/bemasher/fftw/_obj/constants.cgo1.go:73]: function ends without a return statement
constants.go:81[/tmp/go-build773017412/github.com/bemasher/fftw/_obj/constants.cgo1.go:98]: function ends without a return statement

I installed the latest go from source and tried to no avail. Can you drop a few extra returns in the .go file? I hate to fork the entire project for something silly like a missing return, or maybe that's the right thing (hey, I'm new here).

Many thanks.

@bemasher
Copy link
Owner

Can you provide the outputs of: go version and gcc -v

I just built the latest go release in a vagrant box from scratch. The package builds and tests without issue.

vagrant@vagrant-ubuntu-trusty-64:~/gopath$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04 LTS
Release:        14.04
Codename:       trusty
vagrant@vagrant-ubuntu-trusty-64:~/gopath$ go version
go version go1.3 linux/amd64
vagrant@vagrant-ubuntu-trusty-64:~/gopath$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.2-19ubuntu1' --with-bugurl=file:///usr/share/doc
/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --
enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --wi
th-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enab
le-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --wi
th-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java
-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-ja
r-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/ecli
pse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib
-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu -
-target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)
vagrant@vagrant-ubuntu-trusty-64:~/gopath$ go build -a -v github.com/bemasher/fftw
runtime
errors
sync/atomic
math
sync
io
syscall
time
unicode/utf8
strconv
os
reflect
unicode
fmt
strings
runtime/cgo
github.com/bemasher/fftw
vagrant@vagrant-ubuntu-trusty-64:~/gopath$ go test -v github.com/bemasher/fftw
=== RUN TestDFT1D
--- PASS: TestDFT1D (0.00 seconds)
=== RUN TestHCDFT1D
--- PASS: TestHCDFT1D (0.00 seconds)
=== RUN: ExampleDFT1DPlan
--- PASS: ExampleDFT1DPlan (270.719us)
=== RUN: ExampleHCDFT1DPlan
--- PASS: ExampleHCDFT1DPlan (54.822us)
PASS
ok      github.com/bemasher/fftw        0.011s
vagrant@vagrant-ubuntu-trusty-64:~/gopath$

If you'd like I can provide the vagrant configuration so you can verify.

In the future, please open issues in the repository the problem relates to rather than repositories where the issue is in a dependency. Or if a previous issue, comment there.

@briannadeau
Copy link
Author

Hi, here's the output

root@linux1:/home/nadeau/go/bin# go version
go version go1

root@linux1:/home/nadeau/go/bin# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) 

Good point, I should have put the issue in the other repository. Also, I put the two returns into the code last night and everything is working fine after that change and tuning the frequency to match my meter.

@bemasher
Copy link
Owner

The go version string looks like you aren't running the latest release. If you built go from scratch but didn't add the new go binary to the path then you may still be executing the old version.

What do which go and echo $PATH produce?

@briannadeau
Copy link
Author

That could be the issue, I'll poke around to see where it was built. In the mean time the path info --

root@linux1:/home/nadeau# which go
/usr/bin/go
root@linux1:/home/nadeau# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

@bemasher
Copy link
Owner

Yeah, that confirms it, you may have built the latest release from source but the previous version is what is being executed. You'll want to remove the old version.

@bemasher
Copy link
Owner

The code will stay as it is because I've only tested with Go 1.2 and up. The errors serve as a sort of canary for issues submitted as a result of using an unsupported version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants