-
Notifications
You must be signed in to change notification settings - Fork 17
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
gospeccy wont compile on OS X #31
Comments
Yeah, it's a known issue that I never had the time to document and fix. Thank you very much for reporting it. We'll try to fix it as soon as possible. |
The package should now compile on a 32-bit Mac. [https://github.com/0xe2-0x9a-0x9b/Go-PerfEvents/commit/16bb5a901c1b16a6f89198de7344cd21a3ceae37] 64-bit Mac will gain support when somebody generates "types.6.go" file on 64-bit Linux and submits a request to push it into my repository. |
Thanks for the fix! I'll generate types.6.go for you as soon as possible @jonnosan, any success compiling gospeccy after the fix? Feedback would be greatly appreciated! Thanks |
I still can't compile Perf-Events: This is the first time I've used go, so am not completely sure I've got a working installation of that, nor how to troubleshoot |
whoops - I closed this by mistake, can't work out how to reopen |
I've generated a struct.6.go file on my Go-PerfEvents and sent pull request 0xe2-0x9a-0x9b/Go-PerfEvents#1. We will wait for the author to merge. @jonnosan meanwhile, you can try the following:
Then go to the gospeccy source dir and issue:
You may also need to install the goam build tool that, unfortunately, is currently broken for your platform :) BTW, I've got a trivial fix for it and you can just goinstall it from my fork:
After the author of Goam and Go-PerfEvents will merge from my repos, I'd suggest you to rearrange your environment to be in sync with her/his repositories. Waiting for your feedback! Thanks. |
@jonnosan: I just merged the fix to the main Go-PerfEvents repository. No need for you to perform the stuff mentioned in the previous message sent be remogatto. |
I installed goam per your above instructions, but it seems to be having issues:
|
This is because goam is not able to extract version numbers that are not numbers (note the + character at the end of the string). I uploaded a naive fix that just trim right any plus character from the version number string. http://github.com/remogatto/goam BTW, it seems you're running an "old" version of the 6g compiler. Latest release version number is 6787. Please, consider updating since GoSpeccy lives on the bleeding edge and it usually needs an updated toolchain to build. Hopefully, this is the last issue you encountered before successfully compile and run gospeccy on your mac :) Thanks for your feedback. |
I refreshed my go install, and also updated goam.
|
So I made a few hacks & got a bit further: Then I got an error "sed: --in-place: No such file or directory" so In the sdl Makefile I changed "sed s/cgo_sdl/cgo_⚛sdl/ --in-place _cgo_defun.c" to "sed s/cgo_sdl/cgo_⚛sdl/ -in-place _cgo_defun.c" Now I get this:
|
So I hacked sdl/audio/callback.c to include an OS X implementation of get_time (cribbed from http://le-depotoir.googlecode.com/svn/trunk/misc/clock_gettime_stub.c ) Then I hacked the sdl/ttf/Makefile to pass -I/opt/local/include to gcc That got all the SDL package compiling. In order to get Go-PerfEvents to compile I had to change line 66 in perf.go to use syscall.Getpid instead of syscall.Gettid I am assuming the PerfEvents is all nopped out on darwin anyway, so was just trying to get to compile. Now I am finally starting to compile gospeccy proper, and I see there are calls to gettid in z80.go as well, which looks like it's kind of important. |
so after further hacking, including :
I eventually got "goam install" to complete, and had an "a.out" in the src directory when I tried to run ./a.out, I got "dyld: Library not loaded: @rpath/cgo_sdl.so" After reading the dyld man page, and poking around on my filesystem, I ended up adding "export DYLD_LIBRARY_PATH=/Users/jonnosan/src/go/pkg/darwin_amd64/:. " to my profile. Then I discovered that all the "cgo_sdl*.so" files in that folder actually had a weird character in the filenames, e.g. "cgo_⚛sdl_ttf.so" So I tried to get around that with more "ln -s" hacking. Which got me a little further, but now when I run a.out I get :
At this point, I think I have butchered so many things (both in my 'go' setup, and in the gospeccy code & dependancies) it's probably going to be impossible to debug, so I'm going to stop swimming against the tide and see if I can get linux running in a VM instead. |
Which OSX version are you running? I'll try to setup a development environment for OSX trying to debug the installation issues you got. I'd like to see GoSpeccy running at least on OSX and Linux. |
I'm on OS X 10.6.5 I did manage to get ubuntu running under VirtualBox, and got go & gospeccy compiled without any dramas - it even ran the Fire104b demo (which I thought looked familiar - when I read the .nfo I realised I was at the Syntax '09 party where it was released :-) |
Unfortunately, I still didn't have the chance to setup a MacOSX dev env... @jonnosan have you tried building gospeccy after the latest big changes in cgo? I'd really appreciate any news about that! Thank you! |
Hi @remogatto, gospeccy seems to compile on MacOSX without issues (go 1.6.2). It also appears to run without any errors too but unfortunately it does not display the GUI window so you can't actually see the spectrum running. |
PR #62 adds the build flags so that the output shows on OSX. You just need to make sure that you have an SDL with X11 compiled in (I added how to do this in the readme) |
gospeccy has a dependency on Go-PerfEvents, which looks to be linux only.
As a result, I can't compile (and thus can't execute) gospeccy on my Mac :-(
The text was updated successfully, but these errors were encountered: