I'm working on the FreeBSD port of nim. Everything build OK and I've managed to get it installed, but the installed compiler seems to have problems.
I'm having trouble as modules in the standard library that import other standard library modules, but without a std/ prefix don't seem to work (they aren't found). Is this expected or is there some configuration that I've missed? I assume that it's not really expected as otherwise the standard library wouldn't be litterred with such references.
For an evolution, there have ben a surprising number of things I've had to fix as all the git clones in koch are just not allewd by the FreeBSD ports system and more linux assumptions have slipped in with the handling of the directory structure.
Alas it's not that simple as to make the port I have to conform the the porting rules, that nim breaks unfortunately. This hasn't been a problem for some time as the port has been in good shape and has merely needed updating, but with the move to 2.0.0, things seem to have changed a bit more.
I've managed to weed out all the git clones (naughty!) and I thought that I had managed to get everything working using a more standard directory structure again, but I have the problem with std libraries not being imported unless prefixed with std/. This probably means I have some path set wrongly somewhere in the configuration, or I haven't managed to modify some path search to use the required directory structure.
I suppose one option would be to abandon the standard directory structure and use a /usr/local/nim directory, which would mean fewer changed to the original code. This is what a very few ports, such as lvm, do, but I think I will need a good reason to justify this before it will be committed, and it will require users to faff about with their path as well. Normally after a pkg/port is installed, things just work. This would no longer be so.
This probably means I have some path set wrongly somewhere in the configuration, or I haven't managed to modify some path search to use the required directory structure.
Most probably, yes.
My observation related to the FreeBSD port of Nim.
Several months ago, I need to play with the development version of Nim. First I tried to install it in FreeBSD way, by upgrading the existing port. It didn't build. So I built Nim manually, with the standard ./build_all.sh command. It worked as expected. Then I manually moved freshly build version of Nim to proper places in /usr/local tree. And everything was working out-of-box without any patches. So, the problem can be withing the port recipe:
Personally, I would take the opportunity and modernize or rewrite the port to check the new build system. I can't promise anything, but I will try to look at it in the next week. Maybe the option with separated directory won't be needed. ;)
Just a small update after some tests, more like note for myself. ;)
The whole process of installing Nim on FreeBSD looks that (without downloading, decompressing, etc.):
Things to fix or change:
I will try to create a new version of the port in the next week, unless someone wants to do it faster. ;)