dbuenzli / topkg

The transitory OCaml software packager
http://erratique.ch/software/topkg
ISC License
69 stars 25 forks source link

Compilation broken on Windows #94

Closed murmour closed 7 years ago

murmour commented 7 years ago

This is what I get when doing opam install topkg with the official installer:

#=== ERROR while installing topkg.0.8.1 =======================================#
# opam-version 1.2.2
# os           cygwin
# command      ocaml pkg/pkg.ml build --pkg-name topkg --pinned false
# path         /home/mrm/.opam/system/build/topkg.0.8.1
# compiler     system (4.02.3)
# exit-code    2
# env-file     /home/mrm/.opam/system/build/topkg.0.8.1/topkg-2408-af3201.env
# stdout-file  /home/mrm/.opam/system/build/topkg.0.8.1/topkg-2408-af3201.out
# stderr-file  /home/mrm/.opam/system/build/topkg.0.8.1/topkg-2408-af3201.err
### stdout ###
# Cannot find file topfind.
### stderr ###
# Unknown directive `require'.
dbuenzli commented 7 years ago

The problem here seems that this line doesn't work on windows, that is that scripts using ocamlfind do not work on windows.

dbuenzli commented 7 years ago

@cakeplus is there something topkg can do here ?

murmour commented 7 years ago

Hello. I have investigated the matter and filed a bug upstream: https://github.com/protz/ocaml-installer/issues/53.

As for topkg, I have worked around the issue by... um... copy-pasting the contents of topfind into pkg.ml, in place of #use "topfind". Afterwards, everything worked fine, but... um...

Later, I needed uutf, so I did the same to it. It felt so bad...

After that, I wanted to use uucp, and had to repeat the ritual. So horrible...

And then, when I needed normalization, uunf was the new victim...

At last, when it was my desire to practice text segmentation, uuseg went the same road... Soul-crushing...

I feel so dirty now. Oh. My. God. Forgive me, Daniel, for all my sins!...

dbuenzli commented 7 years ago

Well that looks a bit grim. But aren't people rallying around https://fdopen.github.io/opam-repository-mingw/ these days ? Is it me or all the people interested in Windows are hard to rally on something. In any case I commented on the issue there and I'm going to close this since it's not a topkg issue per se.

murmour commented 7 years ago

Is it me or all the people interested in Windows are hard to rally on something.

All the people "interested" in Windows are typically those who have to use it for professional purposes. And like many industrial programmers, I have long time grown out of desires to spend precious time on tinkering with the new and shiny things (especially beta software). The official installer may be a bit outdated, but, well, it's official, it (mostly) works, and I already spent effort on migrating from the previous solution (WODI), and it doesn't excite me to do this again, as I really have better things to do in my life.

dbuenzli commented 7 years ago

I'm not making any judgement on the alternatives, it's just that people should rally around something. But I hope that when @dra27's windows support for opam will be upstreamed things will clear up a bit; especially that this will kill the need to maintain a seperate opam OCaml repository, something which won't scale by any means.

The official installer may be a bit outdated, but, well, it's official,

It's not more official than any other it seems.

murmour commented 7 years ago

I'm not making any judgement on the alternatives, it's just that people should rally around something.

Well, I rally around my employer -- it takes lots of effort. Though I agree that, as a rare industrial Windows user, it would be mutually beneficial if I rallied a bit closer to the recent noble developments by @dra27. I'll surely test that new repository later.