jnavila has quit [Remote host closed the connection]
retropikzel has quit [Quit: Vision[0.10.3]: i've been blurred!]
jnavila has joined #ocaml
retropikzel has joined #ocaml
mbuf has joined #ocaml
<mbuf>
If I add a file to runtime/ and update its Makefile NATIVE_C_SOURCES with the filename, it does not get compiled. Is there anything else that needs to done?
<oni-on-ion>
./configure ?
<mbuf>
oni-on-ion, let me check that
<mbuf>
"make clean" does not remove the Makefiles
<mbuf>
It looks like the Makefile is already committed to the repository. So, I thought just adding the file to NATIVE_C_SOURCES should compile the same
<oni-on-ion>
yeah, hmm ...
<mbuf>
oni-on-ion, I do not see any mention of explicit files in configure.ac
<oni-on-ion>
perhaps making a toplevel is cleaner ? or possibly its another $VAR in makefiles, or they are set := by `ls src/*.c` kinda thing ?
<oni-on-ion>
autoconf usually sources from Makefile.* as input (generally Makefile.in, but i see ocaml has several)
<mbuf>
oni-on-ion, I know, but, there are no Makefile.in in the project source tree
<oni-on-ion>
Makefile.* , pls reread statement
<mbuf>
The runtime/Makefile already has libasmrun_OBJECTS := $(NATIVE_C_SOURCES:.c=_n.$(O)) $(ASM_OBJECTS)
<mbuf>
oni-on-ion, okay!
<oni-on-ion>
Makefile is generated by configure(autoconf) sourcing the Makefile.* as input. i will also look for you and type the results here.
<mbuf>
oni-on-ion, let me look through the other Makefile.* files as well; thanks!
<oni-on-ion>
it may be in a subdirectory
<oni-on-ion>
i have it cloned from git, but strangely there are no autoconf/automake files
<mbuf>
oni-on-ion, I actually see .depend files created in runtime/, but, the file that I added does not seem to have an entry
<oni-on-ion>
i feel like asking again; is this the only way to add native/C code to ocaml in your situation? there is also making your own top level (with ocamlmktop) and also utop can do plugin type things.
GreyFaceNoSpace has joined #ocaml
<mbuf>
oni-on-ion, yes, because I plan to work on the runtime
<mbuf>
oni-on-ion, In runtime/.depend there are dependencies for building _b, _bd, _bi, _pic and _n (native source files)
<mbuf>
oni-on-ion, if I add a C file to NATIVE_C_SOURCES, I need to see how to re-generate the .depend file
<oni-on-ion>
ah. then it is of course best that you learn it yourself by diving in and living in the source tree. =P
<mbuf>
oni-on-ion, HACKING.adoc mentions of "make depend"
<mbuf>
"`make depend`:: Regenerate the `.depend` file. Should be used each time new dependencies are added between files."
<mbuf>
Apparently that is only for the .ml files, not for the runtime.
ppalka has left #ocaml ["WeeChat 2.6"]
<mbuf>
Found it. Had to do a "make depend" inside runtime/. I expected the top-level "make depend" to recursively run it for all sub-directories.
<oni-on-ion>
=)
<oni-on-ion>
i would have made the same assumption
<mbuf>
oni-on-ion, :)
<mbuf>
The .depend gets updated, but, the file still does not compile. Strange!
olle has quit [Ping timeout: 240 seconds]
<oni-on-ion>
touch it ?
olle has joined #ocaml
t0b0 has quit [Ping timeout: 268 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
path0s has joined #ocaml
path0s has quit [Quit: Leaving]
path0s has joined #ocaml
<mbuf>
oni-on-ion, it is a common file between BYTECODE_C_SOURCES and NATIVE_C_SOURCES, and I had to fix an implicit-function-declaration error, and it builds fine now; thanks!
path0s has quit [Client Quit]
path0s has joined #ocaml
path0s has quit [Client Quit]
sailor177354 has joined #ocaml
<mbuf>
This is a lot of fun!
<oni-on-ion>
mbuf, ah i see. good to hear =)
t0b0 has joined #ocaml
<mbuf>
oni-on-ion, thanks for your time!
<oni-on-ion>
no problem! sorry that i could not be more accurate or experienced with the source tree
<mbuf>
oni-on-ion, no problem; rubber duck debugging helps
mbuf has quit [Quit: Leaving]
<oni-on-ion>
^_^
Hrundi_V_Bakshi has joined #ocaml
Serpent7776 has joined #ocaml
kakadu__ has joined #ocaml
kakadu_ has quit [Ping timeout: 268 seconds]
kakadu__ has quit [Ping timeout: 240 seconds]
kakadu__ has joined #ocaml
ggole has quit [Quit: Leaving]
mahtob has joined #ocaml
mahtob has quit [Remote host closed the connection]
mahmudov has quit [Ping timeout: 265 seconds]
vicfred has joined #ocaml
ArthurStrong has joined #ocaml
dborisog has quit [Ping timeout: 265 seconds]
olle has quit [Ping timeout: 240 seconds]
olle has joined #ocaml
sailor177354 has quit [Ping timeout: 268 seconds]
igitoor has quit [Ping timeout: 246 seconds]
igitoor has joined #ocaml
troydm has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
troydm has joined #ocaml
igitoor has quit [Changing host]
igitoor has joined #ocaml
gravicappa has quit [Ping timeout: 240 seconds]
retropikzel has quit [Quit: Vision[0.10.3]: i've been blurred!]
kakadu_ has joined #ocaml
kakadu__ has quit [Ping timeout: 265 seconds]
narimiran has quit [Ping timeout: 260 seconds]
bogdan has joined #ocaml
<bogdan>
Hi, I'm new to ocaml world and I need to install some dependencies for a package. I am trying to install ppx_monadic, with opam but I get "Sorry, no solution found: there seems to be a problem with your request". By googling I've read that I should change the resolver, but also found out if I have a later version of opam (>2) I should not do this.
<Fardale>
bogdan: which version of ocaml do you have?
<Fardale>
ocaml --version to find out
<bogdan>
Fardale, The OCaml toplevel, version 4.09.0
<Fardale>
something is blocking for ocaml >= 4.08, you can install a switch with ocaml 4.07.1
<Fardale>
bogdan: ppx_monadic needs ppxx which has the following constaint "ocaml" {>= "4.07.0" & < "4.08.0"}
<bogdan>
Fardale, wow damn, nice catch
<bogdan>
Fardale, since this is my system version, now I need a ocaml version manager
<bogdan>
how are multiple version of ocaml usually handled in the community?
<Fardale>
opam switch create a_name 4.07.1
<Fardale>
with opam switch
<Fardale>
you can change a_name with what you want
<Fardale>
opam switch --help for more information
<bogdan>
wow, it handles versions, nice!
<bogdan>
thank you so much Fardale
<Fardale>
You're welcome
<Leonidas>
bogdan: in addition, noone really uses the system version of ocaml. There's just too many issues with using the system compiler so people usually use opam to manage ocaml installations.
<bogdan>
I see
jnavila has quit [Ping timeout: 256 seconds]
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #ocaml
<Armael>
one problem being that whenever you upgrade your system, it might upgrade the system ocaml compiler, and that will break your opam switch
<Armael>
(if the opam switch is using the system compiler, that is)
<oni-on-ion>
ahh my dune file is not working with latest dune
<oni-on-ion>
internal error at "asmcomp/dune" . from "asmcomp/emit.ml" -- i dont know what these are
<oni-on-ion>
nevermind. big mistake on my part. dune is nice. and i am happy that ocaml ecosystem uses s-exp
tane_ has quit [Quit: Leaving]
<oni-on-ion>
except name spaces. one needs to know when to use '-' over '.' ; for example ctypes.foreign vs. ctypes-foreign
<oni-on-ion>
and merlin!! is great for ocaml. i havent heard much praise for other platforms as much as merlin for ocaml. (example: LSP, and other built-in autocomplete and type referencing)
bogdan has quit [Remote host closed the connection]