IRC channel logs

2015-10-05.log

back to list of logs

<Petruchio>I *think* I have it working.
<mark_weaver>Petruchio: "PKG_PROG_PKG_CONFIG: command not found" suggests that pkg.m4 was not found in ACLOCAL_PATH when you ran autoreconf
<mark_weaver>normally users shouldn't have to run autoreconf, because normally when you download a tarball release, it includes a pre-generated 'configure' script and associated file.
<mark_weaver>*files.
<mark_weaver>Petruchio: more generally, whenever 'configure' fails with an error like that, where the command is all upper-case, that indicates that a *.m4 file was missing in your ACLOCAL_PATH
<Petruchio>I kind of figured that it had to be a missing file... but there are 85 *.m4 files in that directory. I would think that if the directory was a problem, nothing would be working.
<mark_weaver>Petruchio: it doesn't matter how many files are in the directory if it's missing the one that defines the PKG_PROG_PKG_CONFIG macro
<mark_weaver>that macro is defined in pkg.m4
<mark_weaver>which is part of 'pkg-config'
<Petruchio>I see.
<Petruchio>I was wrong about where it was defined.
<Petruchio>By the way, I *think* have that part working (sloppily). I'm presently trying to get the project to find <libguile.h>. I know there has to be a call to pkg-config, but I haven't figured out how that fits into autoconf, at this point.
<Petruchio>I realize I'm mucking around, without properly understanding what I'm doing, but I really would like to get to the point where I can start messing with actual code.
<mark_weaver>Petruchio: I suggest you read section 5.8.2 (Autoconf Macros) of the guile manual
<mark_weaver>also, the macros don't modify CFLAGS. they set GUILE_CFLAGS, and you must arrange to add that to the relevant compile commands
<mark_weaver>and GUILE_LIBS should be added to the relevant link commands
<mark_weaver>you probably want PKG_CHECK_MODULES instead of PKG_PROG_PKG_CONFIG.
<mark_weaver>or the GUILE_* macros
<mark_weaver>GUILE_FLAGS might be a good choice
<Petruchio>I've looked at that section, and tinkered with those. It's the "adding to the relevant" bits that I don't have yet.
<Petruchio>It's not yet clear to me where configure.in is setting CFLAGS, for instance.
<Petruchio>That isn't, of course, a guile issue.
<mark_weaver>Petruchio: does the project use automake? are there Makefile.am files?
<Petruchio>It has GNUmakefile.in
<mark_weaver>where can I find that file?
<Petruchio>Hang on.
<Petruchio> http://pastebin.com/2SCP6FpE
<Petruchio>I haven't been looking at that one as closely as configure.in, yet.
<mark_weaver>pastebin.com blocks tor users, so I can't access it.
<Petruchio>Blocks for users?
<mark_weaver>I know that http://paste.lisp.org/new works
<mark_weaver>yes, if you use Tor to access the web, then pastebin.com blocks the connection
<mark_weaver>s/the web/pastebin.com/
<mark_weaver>is this a free software project? is the source code repository available on the web?
<Petruchio>Ah.
<Petruchio>Yeah, it's PostgreSQL.
<Petruchio>But I can get that up for you in a second.
<mark_weaver>ah, okay. I already have that
<Petruchio>9.4.4
<Petruchio> http://paste.lisp.org/+3CMC
<mark_weaver>which subdirectory contains the files you wish to hook into guile?
<Petruchio>src/backend/parser/
<Petruchio>Basically, I'm looking to catch calls to the parser, and use guile instead. Call makenode from guile, and basically replace SQL.
<mark_weaver>ah, okay
<Petruchio>I don't like SQL. I do like relational algebra, and Scheme has nice syntax for it. :-)
<mark_weaver>Petruchio: I would try adding the following lines to the GNUmakefile.in in src/backend/parser/
<mark_weaver>GUILE_CFLAGS = @GUILE_CFLAGS@
<mark_weaver>CFLAGS += $(GUILE_CFLAGS)
<mark_weaver>I confess that my knowledge of build systems is fairly weak, so I'm not entirely sure that's right
<Petruchio>Well, that makes sense. I was looking in the wrong place. They're doing the recursive make thing.
<mark_weaver>you'll also need something similar for GUILE_LIBS wherever the linking happens
<Petruchio>I guess I thought that these lower-level makefiles were also generated.
<mark_weaver>oh, there's actually no GNUmakefile.in in that directory. it's just a Makefile
<Petruchio>However it seems not.
<Petruchio>Yeah, I put it there.
<Petruchio>The one on the top level is a GNUmakefile because they want to stop you from building the project with some other make.
<Petruchio>Because, apparently, it doesn't work well.
<Petruchio>Still hit this: fatal error: libguile.h: No such file or directory
<mark_weaver>okay, how about this:
<mark_weaver>in src/Makefile.global.in, find the definitions of CFLAGS and LIBS
<Petruchio>Found it.
<mark_weaver>add @GUILE_CFLAGS@ and @GUILE_LIBS@ to those lines, respectively.
<Petruchio>Right.
<mark_weaver>rerun 'config.status' and try again.
<mark_weaver>this may not be the best place to add them, but it seems likely to do the job for now.
<Petruchio>gcc: error: @GUILE_FLAGS@: No such file or directory
<Petruchio>Yeah, I'm willing to wait on "best".
<Petruchio>"Working" would make me happy, and give me something to play with.
<mark_weaver>Petruchio: it should be @GUILE_CFLAGS@
<mark_weaver>you are missing the "C"
<Petruchio>Ah!
<Petruchio>gcc: error: @GUILE_CFLAGS@: No such file or directory
<mark_weaver>Petruchio: did you switch to using PKG_CHECK_MODULE as I suggested? I suspect PKG_PROG_PKG_CONFIG doesn't set GUILE_CFLAGS
<mark_weaver>and after changing that, you'll need to rerun autoreconf and then configure again
<mark_weaver>sorry, I meant PKG_CHECK_MODULES (plural)
<mark_weaver>e.g. the first suggested macro in section 5.8.2 (Autoconf Macros) in the guile manual
<mark_weaver>s/e.g./which is/
<Petruchio>Somewhere along the line, that got commented out. Trying again.
<Petruchio>Now I remember why:
<Petruchio>syntax error near unexpected token `GUILE,'
<mark_weaver>show me the line you added?
<mark_weaver>the PKG_CHECK_MODULES line
<Petruchio>PKG_CHECK_MODULES([GUILE], [guile-2.0])
<mark_weaver>is that the only change you've made to configure.in ?
<Petruchio>No.
<mark_weaver>any other lines you changed that contain the string GUILE ?
<Petruchio>Only as part of a larger string, like GUILE_PKG.
<mark_weaver>does the error happen while running autoreconf, or while running configure ?
<Petruchio>configure.
<mark_weaver>does the string "PKG_CHECK_MODULES" appear anywhere in 'configure' ?
<Petruchio>Yes.
<Petruchio>PKG_CHECK_MODULES(GUILE, guile-2.0)
<Petruchio>As well as two commented-out instances from a different attempt.
<mark_weaver>that indicates the pkg.m4 was not found in ACLOCAL_PATH when you ran autoreconf
<mark_weaver>s/the/that/
<Petruchio>Okay. That file is in /usr/share/aclocal
<Petruchio>Which is where guile.m4 is, and a bunch of the others. As I said, it's a bit confusing to me that anything there wouldn't be found. I could set ACLOCAL_PATH for that directory, though.
<mark_weaver>hmm, actually, it seems that ACLOCAL_PATH might only be used automatically in projects that use automake
<mark_weaver>bah
<mark_weaver>okay, I would try copying guile.m4 into the config subdirectory, and then adding an entry for it in aclocal.m4
<mark_weaver>and then try autoreconf and configure again.
<Petruchio>Okay, I guess I should have made this clear earlier: I wasn't able to make your advice work, and I already have guile.m4 in a subdirectory, per daviid's suggestion.
<Petruchio>And I call AC_CONFIG_MACRO_DIR([m4])
<Petruchio>That said, aren't I looking to get pkg.m4 in?
<mark_weaver>yes, indeed, you are right
<Petruchio>I'll copy that into m4 and see what happens.
<mark_weaver>I have to go afk for a while. good luck!
<Petruchio>Thanks.
<Petruchio>Copied it in. Same outcome.
<androclus>hullo, all.. just wondering.. does anyone know if there's anyone out there working on a guile wrapper api for CDK (curses development kit, http://invisible-island.net/cdk/cdk.html), somewhat like pyCDK (http://pycdk.sourceforge.net/) did for python binding to the CDK library?
<androclus>or, for that matter, doesn't have to be CDK -- could be a guile binding to some other curses widgets set I don't know of..
<androclus>?
***jeff` is now known as androclus
<artyom-poptsov>Hello Guilers
<artyom-poptsov>I've spent some time hacking on SFTP implementation in Guile-SSH, and here's the first results: https://gist.github.com/artyom-poptsov/f54da0653717c4f499ae
<artyom-poptsov>It's a simple implementation of scp in Scheme. Probably someone may find it interesting.
<civodul>Hello Guilers!
<artyom-poptsov>Hello civodul
<paroneayea>hello!
<amz3>héllo :)
<amz3>so microKanren is 51 LOC https://github.com/jasonhemann/microKanren/blob/master/microKanren.scm
<paroneayea>amz3: wow....!
<davexunit>morning guilers
<wleslie>bonjour
<Petruchio>mark_weaver: I was experimenting with PKG_CHECK_MODULES in the minimal test case that daviid wrote for me. It worked, so I set out to find out what the difference was. Turns out if I put the call (about 900 lines) earlier in the same file, it works.
<Petruchio>Why, I have no idea.
<jmd>Whoever invented pkg-config needs to be summarily executed.
<davexunit>that's a bit harsh
<mark_weaver>davexunit +1
<amz3>ahem
<amz3>paroneayea: I found this implementation of minikaren that is well documented http://okmij.org/ftp/Scheme/sokuza-kanren.scm
<amz3>I think that's the original version of microkanren
<amz3>the walk procedure called lookup in that implementation, is the thing I was missing while working on datalog
<amz3>it's a nice idea, basically use list of pairs that represents the substitutions required to obtain the final value
<amz3>eg. ((42 . c) (b . c) (a . b)) means that a is bound to which is bound to c which is bound to 42 otherwise said, a == 42
<amz3>typofix: c -> 42 and not 42 -> c ((c . 42) (b . c) (a . b))
<Petruchio>davexunit: I agree.
<Petruchio>They deserve a trial first.