Skip to content

gerber-diagrams failing to build glib with syntax error #2

@heath

Description

@heath

Nice library! I'm receiving this error when attempting to build gerber-diagrams within a nix-shell:

[13 of 16] Compiling Gerber.Evaluate.GraphicsState ( lib/Gerber/Evaluate/GraphicsState.hs, /Users/heath/local/haskell-gerber/dist-newstyle/build/x86_64-osx/ghc-8.6.5/gerber-0.2.0.0/build/Gerber/Evaluate/GraphicsState.o ) [Data.Monoid.Deletable changed]
[15 of 16] Compiling Gerber.Grammar   ( lib/Gerber/Grammar.hs, /Users/heath/local/haskell-gerber/dist-newstyle/build/x86_64-osx/ghc-8.6.5/gerber-0.2.0.0/build/Gerber/Grammar.o ) [Text.Megaparsec.Char changed]

lib/Gerber/Grammar.hs:304:7: warning: [-Wname-shadowing]
    This binding for ‘negative’ shadows the existing binding
      defined at lib/Gerber/Grammar.hs:59:1
    |
304 |       negative <-
    |       ^^^^^^^^
Building     cairo-0.13.8.0 (all, legacy fallback)
Building     glib-0.13.8.0 (all, legacy fallback)
[16 of 16] Compiling Gerber.Evaluate  ( lib/Gerber/Evaluate.hs, /Users/heath/local/haskell-gerber/dist-newstyle/build/x86_64-osx/ghc-8.6.5/gerber-0.2.0.0/build/Gerber/Evaluate.o ) [Control.Foldl changed]
Installing   cairo-0.13.8.0 (all, legacy fallback)
Completed    cairo-0.13.8.0 (all, legacy fallback)

Failed to build glib-0.13.8.0.
Build log ( /Users/heath/.cabal/logs/ghc-8.6.5/glb-0.13.8.0-fc8e21b9.log ):
[1 of 1] Compiling Main             ( /Users/heath/local/haskell-gerber/dist-newstyle/tmp/src-20000/glib-0.13.8.0/dist/setup/setup.hs, /Users/heath/local/haskell-gerber/dist-newstyle/tmp/src-20000/glib-0.13.8.0/dist/setup/Main.o )
Linking /Users/heath/local/haskell-gerber/dist-newstyle/tmp/src-20000/glib-0.13.8.0/dist/setup/setup ...
Configuring glib-0.13.8.0...
Preprocessing library for glib-0.13.8.0..
setup: Error in C header file.

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/time.h:154: (column 17) [FATAL]
  >>> Syntax error!
  The symbol `__attribute__' does not fit here.

cabal: Failed to build glib-0.13.8.0 (which is required by exe:render-gerbers
from gerber-diagrams-0.1.0.0). See the build log above for details.

It was also complaining about missing z, but I was able to get around that by adding zlib to the required packages. I'm putting this error here in case someone else wants to tackle it 🙂 This is being built on MacOS 10.15.

Original and complete error at https://gist.github.com/heath/bbf35dc2708e530c8b1180a8c8d9e8b1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions