-
Notifications
You must be signed in to change notification settings - Fork 358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NetBSD installation issues #3482
Comments
It seems that you had a succession of tiny errors & incompatibility. Regarding certificates and We already had issues with patch in {Open,Free}BSD. In the end, we choose to use |
@maroneze - it would be worth pinging the package maintainer for ocaml-opam since beta5 is very out-of-date. It would also be worth them making two changes:
|
This time I tried downloading https://github.com/ocaml/opam/archive/2.0.0-rc4.tar.gz directly and running
The culprit is a call to |
Further report: this time I used NetBSD 8.0 (which seems to have no Some packages require patches (e.g. |
I'd like to ask NetBSD enthusiasts if there is a better way to handle the issues I'm having with several packages. NetBSD, as far as I understand, by default installs all files in I believe it could make more sense to simply ask NetBSD users to make a symbolic link from In both cases, patches would be required:
Is there another alternative? |
opam, by default, maintains everything in |
Packages which do not use pkg-config, such as Looking again in more detail, I see that in fact most non-conf packages which include hardcoded paths are actually versions 0.x, which indicates they are not very mature, or old packages using ocaml <=4.00. So it may be in fact doable to patch each file as needed. |
/usr/pkg is pkgsrc specific path, it's the same on other pkgsrc platforms, and /usr/local is for local software out of package management. In general you should install and handle software through pkgsrc. Please do not hardcode any paths like /usr/pkg in 3rd party software, as it's not correct. People are free to install pkgsrc into $HOME/pkg, /opt/pkg etc. |
Thanks for the info, I am ruling out the link from Is there an environment variable or something like As in, Other than with some external tool or assumption about the user environment, I don't see how to discover this configuration. There is even an unanswered SuperUser question about it. |
I think that a user shall not detect pkgsrc from 3rd party software. If we want to integrate 3rd party programs with pkgsrc-aware paths, we must install it from pkgsrc; not the other way around. Hardcoding /usr/local is the correct approach, as a user is free to install OCaml bypassing pkgsrc or any other package management. This means that the correct approach is to use directly the following package: It is actively maintained as the last commit and upgrade is few days old. Regarding OCaml specific questions in the combination of pkgsrc, please send a mail to [email protected]. I'm not a programmer using OCaml. |
@krytarowski - so the only way to use libz, say, if installed via pkgsrc is yourself to be built using pkgsrc? That's unworkable for development tools - how are you supposed to compile anything? |
In NetBSD we have a clean separation of base and packages (ports / pkgsrc). Base ships with the kernel, bootloader, toolchain, userland tools, X and some useful services and its dependencies like dhcpcd, ldap, ftpd, bozohttpd etc. From a programmer point of view, you do not (usually) maintain the base programs, but just maintain a set of externally installed software from said pkgsrc. Upstream NetBSD is responsible to keep the base system in order, you are free to install your local software in /usr/local or through pkgsrc. libz is inside base as a requirement for many programs, but if you need some special version you are free to use the pkgsrc one and you are guaranteed that they will cohabit peacefully without conflicts (unless there are some bugs in a set of packages, it might be possible for so elementary software dependency). |
It's different to the model from a typical linux distro, where you maintain the entire system in packages. You can treat BSD like Windows or MacOSX, that you get a foundation of your OS and just install addons on top of it in whatever version you like, and whatever paths you want. Hardcoding some paths in 3rd party software like MacPorts or similar in opam would be as wrong as hardcoding pkgsrc paths on NetBSD. I would ask a similar question. is Windows or MacOSX unworkable? How is it possible to build anything on top of them? Thanks to pkgsrc we can maintain several versions of the same software, without conflicting with userland. We also do not care whether base GCC is too old or similar, we can get a wide range of compilers from pkgsrc and even configure the framework to use them for building the pkgsrc packages. I know that BSD is mind-blow for typical Linux schemes. |
Sorry if I misunderstood your message, but it seems that it's by design impossible to have something similar to Homebrew's Now that you mention it, I think one of the issues is that I agree that installing Overall, opam differs from distribution-level package managers because it is specific to a programming language, similar to npm, I believe, but with extra requirements concerning C bindings coming from the system. These extra requirements impose the need for external information or assumptions about paths. |
I recommend to get in touch with tech-pkg@, there are several people using OCaml and can suggest proper approaches how to handle this particular example. It's a typical problem not related to pkgsrc, that some programming languages reinvent their packaging system (maven, luarocks, quicklisp, cabal, npm etc) that attempts to be orthogonal to the set of installed software, but it tends to generate issues. I try to defer suggestions how to configure your setup as I miss some details on OCaml. BTW, Gentoo portage-prefix and Nix are similar to pkgsrc. Both were inspired by the BSD system. |
@krytarowski - thanks for taking the time to explain this! If I get the correct impression, the point is (as on Windows) that the libraries could be installed anywhere, so either opam needs to require the user to configure a symlink in a standard place (@maroneze's original suggestion) or opam needs to have this location fed into it when the conf packages are installed in order to use the installed libraries for C bindings. @hannesm and @avsm (who is away at the moment) can both help out here. (As far as I can tell, the issue is now morphing over into an opam-repository issue, though for now it's probably more sensible to keep this discussion in one place) |
My blind guess would be - if we really want to not refer to a pkgsrc version of opam for some reasons - to add a configure option to opam like '--additional-path-with-libraries' '--additional-path-with-includes', but it's a shot in the dark. Please note that NetBSD by design does not have ldconfig (at least comparable to the Linux one), that instructs the dynamic linker where are the libraries. You must use RPATH (-R linker option) against your executable to instruct the linker to search paths in proper locations. |
@dra27 I'm not sure how to help, it is a current issue with opam and non-GNU/Linux systems (that install their packages in a prefix that is not automatically added to calls of The current approach to "fix" this is to add I'm not convinced this is a good solution. I'm not sure whether opam2 is fixing this (maybe @AltGr has some input here?). @krytarowski mentioned |
Please remind that |
I thought avrdude NetBSD issue is the same but it turns out to be different issue. Somehow LD_LIBRARY_PATH is not set to Edit, replacing |
I just installed opam on a NetBSD 7.1.2 (via
pkg_add ocaml-opam
), and it seemed to work fine, however I cannot doopam init
since I have no solvers, and I cannot find NetBSD packages foraspcud
,packup
normccs
.I wonder if I missed something?
I found a mention to NetBSD in this issue, but the CUDF Solver Farm link mentioned by rneswold is broken.
In the Specifying solver dependencies page in the opam website, the link to aspcud is also broken.
I managed to get packup and compile it (after installing gmp, configuring CPATH and LIBRARY_PATH to include the
/usr/pkg/include
and/usr/pkg/lib
respectively), then I installed it, triedopam init
again, and this time I had another error:The error was due to the fact that I did not have the NetBSD CA certificates, however it was not obvious from the error message.
After doing all of that, I finally had a (mostly) working opam installation, with OCaml 4.06.0. Still, when trying to install several packages, I have opam freezing systematically while applying patches to package
num
. WithOPAMDEBUG=1
, I get:My virtual machine indicates no disk nor network accesses, and there is no CPU usage. It really seems frozen. If I Ctrl+C and try again, the same thing happens.
I tried installing another package which also has a patch, such as
camlzip
, but it worked as expected.At this point, I have no idea if it's an issue with opam 2, with the
num
package, with NetBSD, my installation, or something else. I'd like a suggestion on what to try next.The text was updated successfully, but these errors were encountered: