freenode/#clasp - IRC Chatlog
Search
22:52:55
balrog
will keep y'all updated on arch linux progress. testing on my slow dual-atom box that also powers IRC bouncer and other things, and llvm5 has to compile first :)
23:14:31
attila_lendvai
drmeister: ping. the build seems to be broken on my debian stable, even without my last two commits.
23:15:10
attila_lendvai
drmeister: I have these in wscript.config: USE_LLD = True, LLVM5_ORC_NOTIFIER_PATCH = False
23:17:58
attila_lendvai
drmeister: I've sent you a message with the entire build log. it's probably some llvm version issue... "can't create dynamic relocation R_X86_64_PC32 against symbol"
23:21:54
attila_lendvai
there's this, too, maybe this sheds some light to someone who better understands the C++ landscape: https://bugzilla.mozilla.org/show_bug.cgi?id=1348021
23:29:18
drmeister
attila_lendvai: Someone mentioned recently that llvm has removed the default code model.
23:30:14
attila_lendvai
drmeister: if it doesn't happen in some of your linux installs, then feel free to forget it for now.
23:30:35
drmeister
balrog: You mentioned something about llvm CodeModel changes - what is the story there?
23:31:09
attila_lendvai
on the apache issue the problem was due to some non-included header file, or somesuch -- if that rings a bell
23:35:10
attila_lendvai
AFAIK, nothing changed on my computer besides a few security updates and the clasp git repo, so it's most probably something new in clasp.
23:35:37
balrog
drmeister: https://github.com/llvm-mirror/llvm/commit/9aafb854cc7cb8df8338c50cb411a54ce1e09796 see the commit message
23:36:47
attila_lendvai
someone who understands C++ may get enlightened by reading the comment here: https://reviews.freebsd.org/D12064
23:37:30
attila_lendvai
i.e. this: "libunwind.so has symbols with ELF protected visibility which various test applications attempt to preempt. Both GNU gold and LLVM's lld fail to link this case, with errors like"
23:38:54
attila_lendvai
"On ELF, protected visibility indicates that the symbol will be placed in the dynamic symbol table, but that references within the defining module will bind to the local symbol. That is, the symbol cannot be overridden by another module."
2:21:00
drmeister
We should avoid putting DEFMETHOD and DEFUN and other tags in header files. The scraper gets inconsistent information because different .sif files contain different information.
2:21:36
drmeister
I am now flushing all of the sif files when I change tags in header files so that scraping works properly.
2:52:31
drmeister
balrog: There is a Common Lisp program in clasp/src/scraper that reads every C++ source file of clasp and runs the C++ preprocessor on it. The C++ preprocessed output has metadata injected into it that the scraper extracts and builds tables that describe functions, classes, methods, enums with source information that are all exposed to Clasp Common Lisp.
2:53:10
balrog
I'm assuming this is also used on C++ libraries that are going to interface with Clasp?
2:54:21
drmeister
If you want to expose it to Clasp Common Lisp all that you do is: CL_LISPIFY(core:add-name); CLDEFUN int add2(int x, int y) { return x + y; };
2:56:23
drmeister
It's not used by C++ libraries because you would have to edit them. There is a different syntax for external C++ libraries.
2:57:48
drmeister
All of the files in the build/boehm/generated/ directory are generated by the scraper.
2:58:28
drmeister
There are several variants - and they may be in the header file rather than the .cc file
2:58:49
drmeister
Although I should move as many as possible into the .cc files because in the header files they cause problems with consistency.
2:59:26
balrog
ahh, it was probably CL_LISPIFY_NAME()'s logic confusing me at first (I eventually figured that out)
3:00:23
drmeister
CL_LISPIFY_NAME - right. When the code is not being scraped - these are CPP macros that disappear to nothing.
3:00:55
drmeister
When the scraper is operating they expand to additional text and __FILE__ and __LINE__ entries that are parsed out by the scraper.
3:02:22
drmeister
CL_LISPIFY_NAME(...) is a kludge that I developed to deal with years of not consistently naming things.
3:02:41
drmeister
It's got a complicated algorithm that converts C++ style names to Common Lisp style names
3:02:47
balrog
so like -- where does module-get-function-list come from? I see a declaration for getFunctionList() in llvmoExpose.h, but it's not clear where the metadata for the scraper is located.
3:03:33
balrog
(it makes sense that that's where it's coming from, though, that being classname Module, instance method name getFunctionList)
3:07:39
drmeister
Right - I have to apologize for that. I have not been consistent with naming C++ functions
3:08:27
drmeister
The plan is to write a source-to-source transformation program at some point and make all the names consistent.
3:15:35
drmeister
We can generate a list of every function and what we want to rename it to and then let it loose on the entire Clasp+Cando source code.
4:02:00
drmeister
Bike: With the function descriptions that are compiled into the Module's I can provide the function name in errors like: Too few arguments given 3 required 4
4:02:51
balrog
I still don't know why the whole thing is blowing up, though. I'm guessing the cst work is intended to make that less of a problem?