Giter VIP home page Giter VIP logo

Comments (5)

deech avatar deech commented on June 1, 2024

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:

  1. 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
  1. 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.

deech avatar deech commented on June 1, 2024

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.

tonyday567 avatar tonyday567 commented on June 1, 2024

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.

deech avatar deech commented on June 1, 2024

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 installto 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.

tonyday567 avatar tonyday567 commented on June 1, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.