GithubHelp home page GithubHelp logo

package findlib? about ocaml-installer HOT 18 CLOSED

protz avatar protz commented on August 29, 2024
package findlib?

from ocaml-installer.

Comments (18)

thelema avatar thelema commented on August 29, 2024

While I agree with findlib being installed on any system where packages are compiled from source, on an point-and-click install of ocaml, I might think that binary packages would be better, and these wouldn't need findlib. Is there any expectation that further packages be installable?

from ocaml-installer.

protz avatar protz commented on August 29, 2024

I'm not familiar with findlib at all, so please excuse my ignorance :-).

  • If we distribute a binary package, is there a way to register it with findlib somehow?
  • If the user builds the package from source, is it a "plus" to have findlib installed?

I'm unsure as to what the strategy should be: provide additional packages downloadable in binary form, that go along with the ocaml installer, or tell people to install a development environment (say, msys) and build packages themselves...

from ocaml-installer.

thelema avatar thelema commented on August 29, 2024

AFAIK, you just have to put the files in a named subdir of the findlib directory for it to know about them. hmm, thinking more, findlib is still useful for binary packages because it handles dependencies between packages
For building a package from source, it is a plus to have findlib, as it makes installation of that package trivial. (Just give META file and list of files needed to use library)

For maximum ease of use, binary packages that go along with the current installer seems like the best plan.

from ocaml-installer.

protz avatar protz commented on August 29, 2024

Right. So I don't have any plan to make that happen, although I guess a
couple packages would be useful... do you know of anyone who might be
interested in building such packages?

On Thu 15 Dec 2011 04:45:17 PM CET, Edgar Friendly wrote:

AFAIK, you just have to put the files in a named subdir of the findlib directory for it to know about them. hmm, thinking more, findlib is still useful for binary packages because it handles dependencies between packages
For building a package from source, it is a plus to have findlib, as it makes installation of that package trivial. (Just give META file and list of files needed to use library)

For maximum ease of use, binary packages that go along with the current installer seems like the best plan.


Reply to this email directly or view it on GitHub:
#4 (comment)

from ocaml-installer.

thelema avatar thelema commented on August 29, 2024

On 12/15/2011 10:55 AM, Jonathan Protzenko wrote:

Right. So I don't have any plan to make that happen, although I guess a
couple packages would be useful... do you know of anyone who might be
interested in building such packages?

If you can get findlib installed as part of your installer, I'll see
what I can do to have oasis-db and odb support binary installations for
windows. They might be buildable automatically as part of testing them
under windows.

E.

from ocaml-installer.

protz avatar protz commented on August 29, 2024

Cool! So I actually looked into this some time ago. Here's what I wrote
on the matter:

Turns out findlib configures itself at compile-time depending on the
place where ocaml is installed, which makes it hard to distribute under
windows (because the user might pick any arbitrary location for the
ocaml setup). Indeed, /etc/findlib.conf is parameterized
on the findlib install path.

We need to check that the ocaml install dir is not hardcoded inside the
findlib code, otherwise it's going to be very complicated to distribute
under windows...

from ocaml-installer.

thelema avatar thelema commented on August 29, 2024

Would it work to set OCAMLFIND_CONF to point findlib to a new config file?

E

On Thu, Dec 15, 2011 at 11:26 AM, Jonathan Protzenko <
[email protected]

wrote:

Cool! So I actually looked into this some time ago. Here's what I wrote
on the matter:

Turns out findlib configures itself at compile-time depending on the
place where ocaml is installed, which makes it hard to distribute under
windows (because the user might pick any arbitrary location for the
ocaml setup). Indeed, /etc/findlib.conf is parameterized
on the findlib install path.

We need to check that the ocaml install dir is not hardcoded inside the
findlib code, otherwise it's going to be very complicated to distribute
under windows...


Reply to this email directly or view it on GitHub:
#4 (comment)

from ocaml-installer.

protz avatar protz commented on August 29, 2024

I think I can ensure the installer writes the correct values in the
default findlib.conf file; I just need to make sure that the path to
the ocaml installation directory is not hardcoded elsewhere.

On Thu 15 Dec 2011 05:34:34 PM CET, Edgar Friendly wrote:

Would it work to set OCAMLFIND_CONF to point findlib to a new config file?

E

On Thu, Dec 15, 2011 at 11:26 AM, Jonathan Protzenko<
[email protected]

wrote:

Cool! So I actually looked into this some time ago. Here's what I wrote
on the matter:

Turns out findlib configures itself at compile-time depending on the
place where ocaml is installed, which makes it hard to distribute under
windows (because the user might pick any arbitrary location for the
ocaml setup). Indeed,/etc/findlib.conf is parameterized
on the findlib install path.

We need to check that the ocaml install dir is not hardcoded inside the
findlib code, otherwise it's going to be very complicated to distribute
under windows...


Reply to this email directly or view it on GitHub:
#4 (comment)


Reply to this email directly or view it on GitHub:
#4 (comment)

from ocaml-installer.

thelema avatar thelema commented on August 29, 2024

If you can write a custom findlib.conf on install and can make sure
ocamlfind uses it (through environment variable or otherwise), this can
override any hardcoded values in the compiled binary.

E.

On Thu, Dec 15, 2011 at 11:43 AM, Jonathan Protzenko <
[email protected]

wrote:

I think I can ensure the installer writes the correct values in the
default findlib.conf file; I just need to make sure that the path to
the ocaml installation directory is not hardcoded elsewhere.

On Thu 15 Dec 2011 05:34:34 PM CET, Edgar Friendly wrote:

Would it work to set OCAMLFIND_CONF to point findlib to a new config
file?

E

On Thu, Dec 15, 2011 at 11:26 AM, Jonathan Protzenko<
[email protected]

wrote:

Cool! So I actually looked into this some time ago. Here's what I wrote
on the matter:

Turns out findlib configures itself at compile-time depending on the
place where ocaml is installed, which makes it hard to distribute under
windows (because the user might pick any arbitrary location for the
ocaml setup). Indeed,/etc/findlib.conf is parameterized
on the findlib install path.

We need to check that the ocaml install dir is not hardcoded inside the
findlib code, otherwise it's going to be very complicated to distribute
under windows...


Reply to this email directly or view it on GitHub:
#4 (comment)


Reply to this email directly or view it on GitHub:
#4 (comment)


Reply to this email directly or view it on GitHub:
#4 (comment)

from ocaml-installer.

protz avatar protz commented on August 29, 2024

Hi,

Taking some time to take core of the OCaml installer for windows. I just took a closer look at findlib, and from what I gathered, even the path to findlib.conf is determined at compile-time. That means the binary has it hardcoded that findlib.conf should be found at let config_file = "c:/Program Files (x86)/OCaml/etc/findlib.conf";; or whatever it is on my computer (because I'm the one generating the installer).

I think, on Windows, findlib shouldn't try to be smart. It should:

  • try to see if there's an environment variable OCAMLLIB defined or,
  • fallback to Filename.concat Sys.argv.(0) "../lib/" (more concats needed here, of course).

Thoughts?

I could package findlib, but it would break as soon as the user picks a non-standard install location. I could make sure that the hardcoded path for findlib.conf is something like c:\findlib.conf so that later on I can override everything with an installer-generated findlib.conf but that sounds ugly as well...

from ocaml-installer.

thelema avatar thelema commented on August 29, 2024

Just set the environment variable OCAMLFIND_CONF.

From the man pages,
The default location of the configuration file findlib.conf. However, you can set a different location by the environment variable OCAMLFIND_CONF.

from ocaml-installer.

protz avatar protz commented on August 29, 2024

Nice. I didn't see that while reading the source, so I assumed it
didn't exist :)

On Sun 25 Mar 2012 04:43:07 PM CEST, Edgar Friendly wrote:

Just set the environment variable OCAMLFIND_CONF.

From the man pages,
The default location of the configuration file findlib.conf. However, you can set a different location by the environment variable OCAMLFIND_CONF.


Reply to this email directly or view it on GitHub:
#4 (comment)

from ocaml-installer.

protz avatar protz commented on August 29, 2024

http://yquem.inria.fr/~protzenk/caml-installer/ocaml-4.01.0+dev0-i686-mingw64.exe has findlib installed.

I had to generate the lib/topfind file "by hand", because it clearly depends on the absolute location of the ocaml setup. I also had to export more variables in the findlib.conf file.

Thanks for all the good pointers!

jonathan

from ocaml-installer.

thelema avatar thelema commented on August 29, 2024

On 03/28/2012 08:11 AM, Jonathan Protzenko wrote:

http://yquem.inria.fr/~protzenk/caml-installer/ocaml-4.01.0+dev0-i686-mingw64.exe has findlib installed.

I had to generate the lib/topfind file "by hand", because it clearly depends on the absolute location of the ocaml setup. I also had to export more variables in the findlib.conf file.

Thanks for all the good pointers!

jonathan


Reply to this email directly or view it on GitHub:
#4 (comment)

Any chance of having odb.ml included in this distribution? If the
installer doesn't include wget/curl, tar, gzip and a few other unixy
basics, there's not much point, as it won't work. But if this isn't too
unreasonable, it might make users' life much easier, being able to
install ocaml packages in this way.

E.

from ocaml-installer.

protz avatar protz commented on August 29, 2024

Well that's the usual debate : should the installer provide an entire
environment (e.g. msys + the right compilers), so that users can fire
up an "ocaml shell" and get all the good features (odb, native
compilation, etc.)? Or should the installer rather provide the basics
only, and let users pick msys or cygwin later on if they wish to do
more advanced stuff?

With this release, I'm going with the minimalistic approach: the
installer provides just enough to do bytecode, and users are free to
install whatever environment they like if they wish to do native
compilation. Providing an entire environment is much, much more work,
and if the user is an advanced user, they probably have developer tools
set up already, so I don't see much point in providing them with
another standalone environment, that includes gcc, an emulation layer,
and makes the installer much, much more heavy.

Another option would be to provide them with an option, at install-time:

Do you wish to install MingW/MSys?

But that's, again, more work :).

Thanks,

jonathan

On Wed 28 Mar 2012 04:36:44 PM CEST, Edgar Friendly wrote:

On 03/28/2012 08:11 AM, Jonathan Protzenko wrote:

http://yquem.inria.fr/~protzenk/caml-installer/ocaml-4.01.0+dev0-i686-mingw64.exe has findlib installed.

I had to generate the lib/topfind file "by hand", because it clearly depends on the absolute location of the ocaml setup. I also had to export more variables in the findlib.conf file.

Thanks for all the good pointers!

jonathan


Reply to this email directly or view it on GitHub:
#4 (comment)

Any chance of having odb.ml included in this distribution? If the
installer doesn't include wget/curl, tar, gzip and a few other unixy
basics, there's not much point, as it won't work. But if this isn't too
unreasonable, it might make users' life much easier, being able to
install ocaml packages in this way.

E.


Reply to this email directly or view it on GitHub:
#4 (comment)

from ocaml-installer.

thelema avatar thelema commented on August 29, 2024

You're right, it is much more work. Thanks for getting all the pieces
that you've put together working. I'll leave this as a feature request,
maybe after this release is well tried and debugged, work can be put
into a more complete release. Or maybe I can somehow integrate more of
these external tools into odb, so that odb doesn't even depend on these
external executables. Maybe this would be odb-plus.

E.

On 03/28/2012 10:58 AM, Jonathan Protzenko wrote:

Well that's the usual debate : should the installer provide an entire
environment (e.g. msys + the right compilers), so that users can fire
up an "ocaml shell" and get all the good features (odb, native
compilation, etc.)? Or should the installer rather provide the basics
only, and let users pick msys or cygwin later on if they wish to do
more advanced stuff?

With this release, I'm going with the minimalistic approach: the
installer provides just enough to do bytecode, and users are free to
install whatever environment they like if they wish to do native
compilation. Providing an entire environment is much, much more work,
and if the user is an advanced user, they probably have developer tools
set up already, so I don't see much point in providing them with
another standalone environment, that includes gcc, an emulation layer,
and makes the installer much, much more heavy.

Another option would be to provide them with an option, at install-time:

Do you wish to install MingW/MSys?

But that's, again, more work :).

Thanks,

jonathan

On Wed 28 Mar 2012 04:36:44 PM CEST, Edgar Friendly wrote:

On 03/28/2012 08:11 AM, Jonathan Protzenko wrote:

http://yquem.inria.fr/~protzenk/caml-installer/ocaml-4.01.0+dev0-i686-mingw64.exe has findlib installed.

I had to generate the lib/topfind file "by hand", because it clearly depends on the absolute location of the ocaml setup. I also had to export more variables in the findlib.conf file.

Thanks for all the good pointers!

jonathan


Reply to this email directly or view it on GitHub:
#4 (comment)

Any chance of having odb.ml included in this distribution? If the
installer doesn't include wget/curl, tar, gzip and a few other unixy
basics, there's not much point, as it won't work. But if this isn't too
unreasonable, it might make users' life much easier, being able to
install ocaml packages in this way.

E.


Reply to this email directly or view it on GitHub:
#4 (comment)


Reply to this email directly or view it on GitHub:
#4 (comment)

from ocaml-installer.

thelema avatar thelema commented on August 29, 2024

Actually, odb for windows should probably just do binary distribution and extract pre-compiled libraries for very simple install. I'll base these binaries on your distribution, unless you have a better idea.

from ocaml-installer.

protz avatar protz commented on August 29, 2024

That sounds like a good idea, although there are ongoing discussions on
the caml-list about having the installer install cygwin as well, which
would then make it possible for me to distribute odb. Users would then
opt-in to cygwin, and then run "odb" from a cygwin shell, and
everything would be just fine... (hopefully!).

jonathan

On Wed 28 Mar 2012 11:01:30 PM CEST, Edgar Friendly wrote:

Actually, odb for windows should probably just do binary distribution and extract pre-compiled libraries for very simple install. I'll base these binaries on your distribution, unless you have a better idea.


Reply to this email directly or view it on GitHub:
#4 (comment)

from ocaml-installer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.