Comments (5)
The problem is that the configure
script cannot find g++
. I must have installed g++
at some point and forgotten about it when testing. I fixed that issue in the repo but haven't cut a release yet.
Additionally while testing with clang
and clang++
I discovered that the brew
FLTK package is broken. It omits some headers which are available in the stable source release of FLTK
that fltkhs
depends on. clang
flags them as uninitialized variables, g++
ignores them.
To sum up, the fix for this issue is:
- Compile and install FLTK from source.
> wget --no-check-certificate http://fltk.org/pub/fltk/1.3.4/fltk-1.3.4-1-source.tar.gz
> tar -zxf fltk-1.3.4-1-source.tar.gz
> cd fltk-1.3.4-1
> ./configure --enable-gl --enable-shared --enable-localjpeg --enable-localzlib --enable-localpng
> make
> sudo make install
- Clone the HEAD of this repo and
fltkhs-hello-world
into some temp folder, and build both, for example:
> mkdir /tmp/fltkhs-tmp
> cd /tmp/fltkhs-tmp
> git clone http://github.com/deech/fltkhs
> git clone http://github.com/deech/fltkhs-hello-world
> stack init
> stack build
> stack exec fltkhs-hello-world
Sorry for the trouble and thanks for reporting!
from fltkhs.
I've released a fixed version to Hackage. While you'll still need to do step 1 from above (compiling and installing FLTK from source) instead of step 2 you should just be able to git pull
inside the fltkhs-hello-world
directory followed by stack build
and stack exec fltkhs-hello-world
. Thanks again for your patience.
from fltkhs.
Thanks deech,
Good news first - I got the hello-world example running as per your last comment. I am very happy and thanks for your help.
Bad news - I got it running using brew install fltk
. In following the direct source install method, I crashed and burnt deep into the fltk make stage:
~/fltk-1.3.4-1
# make
=== making jpeg ===
=== making zlib ===
=== making png ===
=== making src ===
=== making fluid ===
=== making test ===
Compiling blocks.cxx...
In file included from blocks.cxx:47:0:
/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:162:2: error: expected unqualified-id before '^' token
(^AudioObjectPropertyListenerBlock)( UInt32 inNumberAddresses,
^
/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:162:2: error: expected ')' before '^' token
In file included from blocks.cxx:47:0:
/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:400:41: error: 'AudioObjectPropertyListenerBlock' has not been declared
AudioObjectPropertyListenerBlock inListener) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_7_0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:421:41: error: 'AudioObjectPropertyListenerBlock' has not been declared
AudioObjectPropertyListenerBlock inListener) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_7_0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:792:2: error: expected unqualified-id before '^' token
(^AudioDeviceIOBlock)( const AudioTimeStamp* inNow,
^
/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:792:2: error: expected ')' before '^' token
/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:1326:37:error: 'AudioDeviceIOBlock' has not been declared
AudioDeviceIOBlock inIOBlock) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_7_0);
^~~~~~~~~~~~~~~~~~
make[1]: *** [blocks.o] Error 1
make: *** [all] Error 1
A quick search, but nothing remotely like this error has ever reached the ear of google, it seems. I had a quick peek upstream to see about reporting, but it had that scary, olden-days, subversionesque look.
from fltkhs.
Wow, I've never seen anything like it. However, there is good news, since that happened with the demos that means the rest of it compiled fine and you should still be able to do sudo make install
to copy the libraries and headers to the standard prefix ( I think it's /usr/local
unless you changed it). In any case, since it's working I guess it's a moot point.
from fltkhs.
I upgraded xcode to 8.2.1 in the course of debugging, and I'm guessing that some of macOS Sierra snuck in. Siri making her big entrance to the mac, and something called CoreAudio.h falling over in a stable library may not be a coincidence ...
Regardless, I uninstalled the brew version and sudo make install
gave me a working example as you suggest.
Thanks again
from fltkhs.
Related Issues (20)
- Return function pointer from `openCallback` so it can be freed. HOT 1
- Crash in FL.eventKey on special key HOT 8
- GL causes c2hs error on Mac due to missing type HOT 4
- after using setIcon on window it doesn't display application HOT 4
- Adding a Scrolled via FLUID generates wrong "scrollNew" call instead of "scrolledNew" HOT 1
- How to enable modern OpenGL? HOT 11
- unable to run basic example under nix HOT 1
- Fltkhs as stack dependency linking error on Windows 10 HOT 1
- install gotchas
- Build error in Setup.hs HOT 2
- Error building bundled fltkhs in custom Setup.hs HOT 1
- fltkhs-fluidtohs generates incorrect module names for nested modules
- addAndGetMenuItem is suprisingly slow HOT 8
- How to call findClicked?
- GHC 8.10.3 linking issue HOT 1
- Syntax error while installing with bundled fltkhs HOT 1
- Build fails with autoconf 2.70 and up HOT 8
- New branch's build artifacts stored in /tmp get erased
- Updating for base-4.14 (ghc 8.10) HOT 2
- cabal-install 3.4.0.0 breaks installation HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fltkhs.