<gildor>
the directive "directory=+lablgtk2" make it look for lablgkt in $(ocamlc -where)/lablgtk2"
<roconnor>
oh!
<gildor>
where did you install it ?
<roconnor>
It is installed in /nix/store/979vbpcqzvvmisyd77028gdpax3hi2gr-lablgtk-2.14.1/lib/ocaml/3.11.1/site-lib/lablgtk2
<roconnor>
but lablgtk's installer doesn't use ocamlfind
<gildor>
is the META in the directory where lablgtk*.cma located ?
<roconnor>
I just copied the META file that happend to be in the distribution
<roconnor>
gildor: yes
<gildor>
just remove the "directory=" directive, that'll do
<roconnor>
thanks!
<roconnor>
gildor: I would have never figured that out
<gildor>
FYI, I think this is a Debian created META file that was in METAS/META.lablgtk, where directory directive is useful because the META is outside the lablgtk directory
<roconnor>
gildor: That sounds right
<roconnor>
yay, ocamlfind seems to be returning a resonable location now
<roconnor>
Now I can go back to trying to build lablgtkmathview. Thanks!
<gildor>
np
dark has joined #ocaml
<dark>
before loading batteries (and camlp4), it was all ok. now, ocaml says {< s = x; p = y >} has a problem (it interprets it as s = (x; p =y))
<dark>
how to make an object that is a shallow copy, changing more than one field?
<dark>
I want to try the 'functional style' described at manual005.html#toc30
<dark>
hm. maybe i should just call ocaml toplevel with that parameters
<dark>
(but when I try to actually open Batteries, it says Reference to undefined global `CamomileLibrary', so i need to load something else too..)
<thelema>
yup, camomile
<dark>
how to compile with ocamlc, but with camlp4 extensions?
<thelema>
I don't know - findlib takes care of that for me
<thelema>
you're right, it's a camlp4 problem, not related to batteries, as if I just load camlp4o, the same error happens
<kaustuv_>
Batteries still depends on camlp4?
<thelema>
the toplevel init by default loads it, the package for camlp4 is separate
<roconnor>
I have another small question. ml_gtk_mathview.c includes files such as <caml/mlvalues.h> etc, But the parameter given to gcc is -I$OCAML_LIB_DIR/caml. The net result is that it cannot find $OCAML_LIB_DIR/caml/caml/mlvalues.h
<roconnor>
My question is, which caml subdirectory should I remove
<dark>
i would like to change this default without changing batteries code itself
<roconnor>
the ones in the .c file, or the parameter to gcc?
<dark>
i.e. only at ocamlinit
<gildor>
roconnor: in gcc of course
<thelema>
dark: remove the last line of batteries' ocamlinit and replace it with the contents of battop.ml
<gildor>
-I$OCAML_LIB_DIR
<roconnor>
gildor: sure, I find that natural, however I fibed a little. it is actually gcc -I$OCAML_INCLUDE_DIR where OCAML_INCLUDE_DIR is set to $OCAML_LIB_DIR/caml (or /usr/include/caml) in ./configure
<roconnor>
gildor: does this mean that ./configure is broken?
<gildor>
don't know
<dark>
Hmmmm. nice. also this explains how to not print the greeting message.^^
<roconnor>
gildor: okay, I'll patch ./configure
<gildor>
what is your configure invocation
<dark>
#install_printer is something nice. is it from batteries, or from the toplevel itself?
<thelema>
dark: toplevel itself
th5 has joined #ocaml
<dark>
everything is fine now:)
<roconnor>
gildor: ./configure --prefix ...
<gildor>
I just remember that in Debian we have a symlink from /usr/include/caml to +caml/
ikaros has quit [Quit: Leave the magic to Houdini]
_unK has joined #ocaml
<gildor>
this makes -I$OCAML_LIB_DIR useless
<gildor>
and you can fix your problem without patch using INCLUDE=$INCLUDES:$OCAML_LIB_DIR make ...
<roconnor>
gildor: this is probably why the build worked for the person who made the tar ball.
<roconnor>
gildor: and why it works on debian.
verte has quit [Quit: ~~~ Crash in JIT!]
<roconnor>
gildor: ya, that is a tempting alternative
<dark>
this kind of variable prompted security warnings recently
<dark>
but it was with LD_LIBRARY_PATH=$LD_LIBRARY_PATH:..
<gildor>
dark: what kind ?
<dark>
what happens when the variable is empty?
<gildor>
dark: LD_LIBRARY_PATH is really another problem ;-) (because it involves runtime invocation and override of libc)
<dark>
well, yes
<gildor>
when INCLUDE_PATH is empty ? Nothing get added to include path of gcc
<dark>
but if the INCLUDE_PATH is :/a/b
<dark>
would it include the current directory first? (but anyway, this seems less of a problem)
<gildor>
maybe you can trick someone by placing a stdio.h in you $OCAML_LIB_DIR and divert various function when compiling C code
<gildor>
dark: the current directory is anyway in the search path
<dark>
so it isn't a problem at all
<gildor>
indeed ;-)
<roconnor>
gildor: I'm going to look into making sure that the headers are aways in the Include path when ocaml is a build input.
<gildor>
why not add a symlink from /usr/include/caml to +caml ?
<gildor>
roconnor: ^^^
<roconnor>
gildor: nix doesn't have a /usr directory
<gildor>
how gcc manage to find its /usr/include ?
<avsm>
its built in
<avsm>
cc -print-search-dirs
<avsm>
for example
<roconnor>
gildor: it is some magic combination of a gcc-wrapper and possibly gcc is patched
<roconnor>
I don't know the details myself
<gildor>
avsm: thanks, but roconnor tells that on nixos there is no /usr/include (I suppose there is one foreach package, which can makes a lot of include dir)
<avsm>
-nostdinc
<avsm>
then turns that off
<roconnor>
gildor: the gcc command lines can get quite long
<avsm>
i havent followed the rest of the thread, but you just disable standard includes from gcc with that
<avsm>
and then you specify -I directly
<roconnor>
gildor: are your caml/foo.h files installed in something/lib/ocaml/caml/foo.h ?
<gildor>
roconnor: just for fun what is the output of gcc -print-search-dirs | wc -c
<gildor>
1250 on Debian
<roconnor>
2184
<gildor>
not that big ;-)
<roconnor>
I'll paste it
<avsm>
thats for libraries, it doesnt really matter
<gildor>
roconnor: maybe there is a standard way on nixos to add a new search path to gcc, you should try to use it to add +caml to it
<roconnor>
gildor: ya that is what I'm looking into now
<roconnor>
gildor: are your caml/foo.h files installed in something/lib/ocaml/caml/foo.h ?
<gildor>
roconnor: I don't often distribute .h files in my OCaml projects
<gildor>
(I don't in fact)
<roconnor>
gildor: I mean the ones that come with ocaml
<roconnor>
e.g. caml/mlvalues.h
<gildor>
its installed in /usr/lib/ocaml/caml/
<gildor>
e.g. /usr/lib/ocaml/caml/mlvalues.h
<roconnor>
gildor: good
<roconnor>
gildor: though, don't you find that a strange place for header files?
<gildor>
that is the reasone why it is linked to /usr/include/caml
<gildor>
but .cmi are also headers file
<gildor>
header files
<roconnor>
okay
<roconnor>
I think I know what I need to do now
<gildor>
and you can even find .mli in these directories (which are non-precompiled header files, just like .h files)
<roconnor>
I think I'll more or less follow you advice
<roconnor>
if I make a symlink from include/caml to lib/ocaml/caml as a post build step
<roconnor>
then the headers should automatically come available to any package that depends on ocaml
* roconnor
tries
iago has joined #ocaml
<roconnor>
sadly this means rebuilding ocaml and every ocaml package (the ocaml packages are rebuilt because it doesn't know that it hasn't really changed)
<roconnor>
but it should be good in the long run
Yoric has joined #ocaml
barismetin has quit [Remote host closed the connection]
<roconnor>
(and thanks to nix I can keep my old ocaml installation while working on building a new one)
<dark>
nix?
<dark>
roconnor: nixos, or nix on top of something else?
<roconnor>
nixos
<roconnor>
though it theory it would work with nix anywhere
<dark>
interesting.. i'm about to install, but i'm having some hard time at the fundamentals
<dark>
it looks like there is not much documentation
<dark>
i use gentoo right now
<roconnor>
dark: I get a lot of help on the irc channel
<dark>
and i'm constantly paying the price for mutable, in-place software updates
<roconnor>
It was a bit tough at first but I quickly got the hang of it.
<dark>
roconnor: yeah i was able to get past of some difficulties there
<roconnor>
dark: partly because I wanted to start with encrypted root
<dark>
yes, i have an encrypted partition, and inside it an lvm volume
<roconnor>
so I had to learn some unsual boot hooks off the bat
<dark>
hmm
<dark>
i don't need to manage the boot inside nix..
<dark>
i actually manage grub from debian (i have debian and gentoo right now)
<dark>
and my initrd is homemade
<roconnor>
nixos keeps old system configurations around on the grub menu so you can revert to any previous configuration at boot time if you want
<dark>
do it support grub2?
<roconnor>
dark: yes
<roconnor>
though I think grub1 is still the default
<dark>
well, i can have it producing /etc/grub.d files, and feeding it to my usual grub installation
<roconnor>
I don't know grub2, sounds plausible though
<dark>
grub1 is default at gentoo, and i can't get to install grub2:(
<roconnor>
I ran grub2 for a while, but I couldn't figure out the syntax to get it to boot windows properly
<roconnor>
not that I really wanted to boot windows
<roconnor>
but I figured I'd return the lab's laptop in a mode where they could recover windows if they wanted to
<dark>
it comes with a predefined os detector (at least in debian), but i disabled it
<roconnor>
dark: I've never used gentoo, but I get the feeling that gentoo users would like nixos.
<dark>
yes, i found nixos interesting :) but some concepts are quite different
<dark>
well i have to go, bye
dark has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
ttamttam has quit [Remote host closed the connection]
<roconnor>
gildor: my symlink seems to have worked
ikaros has joined #ocaml
sepp2k has quit [Read error: Connection reset by peer]
|marius| has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
|marius| has quit [Remote host closed the connection]
|marius| has joined #ocaml
|marius| has quit [Ping timeout: 240 seconds]
Edward has joined #ocaml
<gildor>
roconnor: good news
|marius| has joined #ocaml
|marius| has quit [Remote host closed the connection]
th5 has quit [Quit: th5]
<roconnor>
gildor: I sent a patch to the developers of nixpkgs
|marius| has joined #ocaml
ygrek has joined #ocaml
iago has quit [Quit: Leaving]
Yoric has quit [Quit: Yoric]
caligula_ has quit [Read error: Connection reset by peer]
ulfdoz has joined #ocaml
caligula_ has joined #ocaml
jakedouglas has joined #ocaml
avsm has quit [Quit: Leaving.]
eldragon is now known as maharba
Yoric has joined #ocaml
Yoric has quit [Ping timeout: 260 seconds]
mcclurmc has joined #ocaml
oriba has joined #ocaml
Edward has quit []
vpalle_ has joined #ocaml
Anarchos has joined #ocaml
Associat0r has joined #ocaml
TaXules_ has joined #ocaml
TaXules has quit [Remote host closed the connection]
fraggle_ has quit [Remote host closed the connection]
Edward has joined #ocaml
ulfdoz has quit [Ping timeout: 245 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
jakedouglas has quit [Quit: Leaving.]
JimmyRcom has quit [Read error: Connection reset by peer]
Associat0r has quit [Quit: Associat0r]
fraggle_ has joined #ocaml
fraggle_ has quit [Quit: -ENOBRAIN]
fraggle_ has joined #ocaml
vpalle_ has quit [Ping timeout: 276 seconds]
npouillard has joined #ocaml
jakedouglas has joined #ocaml
Modius_ has joined #ocaml
Modius has quit [Ping timeout: 260 seconds]
ygrek has quit [Ping timeout: 245 seconds]
tautologico has joined #ocaml
vpalle_ has joined #ocaml
roconnor has quit [Remote host closed the connection]
JimmyRcom has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]
vpalle_ has quit [Ping timeout: 265 seconds]
jakedouglas has quit [Quit: Leaving.]
tautologico has quit [Remote host closed the connection]