prolic / HsQML

This is a mirror of the darcs repository at http://hub.darcs.net/komadori/HsQML
http://www.gekkou.co.uk/software/hsqml/
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

Set up CI and update cabal file #4

Open Kleidukos opened 3 months ago

Kleidukos commented 3 months ago

This PR brings the following changes:

Bonus commits:


Closes #2 #3

Kleidukos commented 3 months ago

@prolic This PR is now ready for review. :)

prolic commented 3 months ago

I ran with cabal 3.10.3.0 and had to upgrade to cabal 3.12.1.0 so I can test these code changes, fair enough.

When compiling I see this:

Warning: [misplaced-c-opt] Instead of 'ghc-shared-options: -framework-path'
use 'extra-framework-dirs: /QT_ROOT/lib'

Compilation of the library works though. Next I tried the first demo app with this changes, so I updated github.com/prolic/hsqml-demo-notes cabal.project file and put this:

packages:
    ./

source-repository-package
  type: git
  location: https://github.com/Kleidukos/HsQML
  tag: bdf29a5b0666d9173fc903b442c91f457abd8133

and I see this build error:

cabal build
Cloning into '/home/sasa/code/hsqml-demo-notes/dist-newstyle/src/HsQML-b5741da83d597ac4'...
remote: Enumerating objects: 2074, done.
remote: Counting objects: 100% (37/37), done.
remote: Compressing objects: 100% (24/24), done.
remote: Total 2074 (delta 11), reused 28 (delta 8), pack-reused 2037
Receiving objects: 100% (2074/2074), 1.15 MiB | 1.18 MiB/s, done.
Resolving deltas: 100% (1137/1137), done.
HEAD is now at bdf29a5 Format the cabal file with cabal-fmt
Resolving dependencies...
Build profile: -w ghc-9.4.8 -O1
In order, the following will be built (use -v for more details):
 - hsqml-0.3.6.0 (lib:hsqml) (requires build)
 - hsqml-demo-notes-0.3.3.0 (exe:hsqml-notes-slow) (first run)
 - hsqml-demo-notes-0.3.3.0 (exe:hsqml-notes) (first run)
Starting     hsqml-0.3.6.0 (all, legacy fallback: build-type is Custom)
Building     hsqml-0.3.6.0 (all, legacy fallback: build-type is Custom)

Failed to build hsqml-0.3.6.0.
Build log (
/home/sasa/.cabal/logs/ghc-9.4.8/hsqml-0.3.6.0-143f7b9684631edf1eecd11d411090d3d9e6131b65c98bb26226396779a867aa.log
):
[1 of 2] Compiling Main             ( /home/sasa/code/hsqml-demo-notes/dist-newstyle/tmp/src-11438/hsqml-0.3.6.0/dist/setup/setup.hs, /home/sasa/code/hsqml-demo-notes/dist-newstyle/tmp/src-11438/hsqml-0.3.6.0/dist/setup/Main.o )
[2 of 2] Linking /home/sasa/code/hsqml-demo-notes/dist-newstyle/tmp/src-11438/hsqml-0.3.6.0/dist/setup/setup
Configuring hsqml-0.3.6.0...
Warning: [misplaced-c-opt] Instead of 'ghc-shared-options: -framework-path'
use 'extra-framework-dirs: /QT_ROOT/lib'
Preprocessing library for hsqml-0.3.6.0...
c2hs: Graphics/QML/Internal/BindPrim.chi not found in:
dist/build
.

Error: [Cabal-7125]
Failed to build hsqml-0.3.6.0 (which is required by exe:hsqml-notes-slow from hsqml-demo-notes-0.3.3.0 and exe:hsqml-notes from hsqml-demo-notes-0.3.3.0). See the build log above for details.

@Kleidukos any idea what's wrong? I might be able to look further into this Monday, but maybe you have an idea.

Kleidukos commented 3 months ago

Good catch regarding misplaced-c-opt, I'll fix it.

I'll investigate the build error as well this week-end! This is a c2hs problem.

prolic commented 3 months ago

Maybe the build error is related to the warning and solves itself.

On Sun, Jul 28, 2024, 03:05 Hécate @.***> wrote:

Good catch regarding misplaced-c-opt, I'll fix it.

I'll investigate the build error as well this week-end!

— Reply to this email directly, view it on GitHub https://github.com/prolic/HsQML/pull/4#issuecomment-2254369612, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADAJPEU2SAAECJYCL7TTBLZOSJ3LAVCNFSM6AAAAABLRW2XWCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJUGM3DSNRRGI . You are receiving this because you were mentioned.Message ID: @.***>

Kleidukos commented 3 months ago

Not really, the cabal warning is for macOS framework paths, the build error is related to c2hs on my linux machine

prolic commented 2 months ago

I am going to review this again ASAP