agda / agda2hs

Compiling Agda code to readable Haskell

Home Page:https://agda.github.io/agda2hs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

yaml-light issue on macos (arm?)

jmchapman opened this issue · comments

I cannot install v1.1 currently on my mac as the build fails on trying to build HsSyck which is a dependency of yaml-light.

I am not sure what the cause is, perhaps using clang instead of gcc. I tried various different ways of installing ghc, via nix, brew and ghcup without any success.

Here is a snippet of the beginning and end of the output:

Building library for HsSyck-0.53..
[1 of 1] Compiling Data.Yaml.Syck   ( dist/build/Data/Yaml/Syck.hs, dist/build/Data/Yaml/Syck.o, dist/build/Data/Yaml/Syck.dyn_o )

/var/folders/st/qcbnthv91yl5tg_z6_jvn8w80000gn/T/ghc60694_0/ghc_4.c:39:17: error:
     warning: incompatible pointer to integer conversion assigning to 'ffi_arg' (aka 'unsigned long') from 'HsPtr' (aka 'void *') [-Wint-conversion]
   |
39 | *(ffi_arg*)resp = cret;
   |                 ^
*(ffi_arg*)resp = cret;
                ^ ~~~~
1 warning generated.

[snip]

gram.c:656:16: error:  note: expanded from macro 'YYLEX'
# define YYLEX yylex (&yylval, YYLEX_PARAM)
               ^

syck/gram.c:51:17: error:  note: expanded from macro 'yylex'
   |
51 | #define yylex   sycklex
   |                 ^
#define yylex   sycklex
                ^
1 error generated.
`clang' failed in phase `C Compiler'. (Exit code: 1)
Error: cabal: Failed to build HsSyck-0.53 (which is required by
exe:agda2hs-mode from agda2hs-1.1 and exe:agda2hs from agda2hs-1.1). See the

I'm hoping to get rid of HsSyck and the yaml-light dependency, see #225.

You can try compiling these changes and see if this other library causes issues.

I have the same issue. The underlying problem is that the dependencies are seriously outdated, to the point that they qualify as unmaintained:

  • yaml-light — last upload at 2010-10-27
  • HsSyck — last upload at 2015-02-27

Yes, PR #189 got merged perhaps too hastily. Can you try again with current master? I just merged #225 which removes those outdated dependencies.

Can you try again with current master?

I have tried with the current master branch, and the result compiles on macOS with ghc-9.2.8:

$ cabal build
[…]
$ […]/agda2hs --version
Agda version 2.6.4-e4bca58
 - agda2hs backend version 1.2

If you ask me, I would recommend to deprecate agda2hs-1.1 on Hackage — the dependencies are just too old for this release on Hackage to be useful.

Well it is currently the latest release of agda2hs so I wouldn't want to deprecate it just yet. I will put the release of agda2hs 1.2 on the agenda and deprecate 1.1 as soon as it is released.