0x7CFE / llst

LLVM powered Little Smalltalk.
Other
94 stars 10 forks source link

Build problem on Arch: duplicate typedef in readline.h #45

Closed epitron closed 10 years ago

epitron commented 10 years ago

Hey guys!

I'm getting this issue building llst:

[100%] Building CXX object CMakeFiles/llst.dir/src/vm.cpp.o
In file included from /usr/include/readline/readline.h:35:0,
                 from /ubuntu/src/llst/src/vm.cpp:36:
/usr/include/readline/rltypedefs.h:64:28: error: typedef ‘rl_getc_func_t’ is initialized (use decltype instead)
 typedef int rl_getc_func_t PARAMS((FILE *));
                            ^

I'm using readline 6.2.004.

0x7CFE commented 10 years ago

Hi!

Could you please tell us what OS you are using at the moment? What compiler, etc. Moreover, it would be really helpful if you'll try to attach the whole console output of the build process starting from cmake invocation.

Thank you for your reply!

P.S.: Have you tried to run the precompiled version of llst? Did it work?

0x7CFE commented 10 years ago

Whops, clicked the wrong button.

epitron commented 10 years ago

I'm running Arch Linux, a Linux distribution with a rolling release. (No versioned releases, just a "latest version" that they keep up to date.)

Here's the console output for the build:

Without LLVM: http://showterm.io/351df2501be71f4a31002 With LLVM: http://showterm.io/d0d46bb0a17493bc6b346

I haven't tried the binary builds -- where are those located?

epitron commented 10 years ago

(BTW, I'm using llvm 3.3)

0x7CFE commented 10 years ago

Ah, my bad. I forgot to mention that we're using LLVM 3.1. Unfortunately, LLVM API had changed since then so it will fail to compile. Still, we're working on it and will try to provide 3.3 support ASAP.

Binary files may be found here: https://github.com/0x7CFE/llst/releases You may try to use llst_0.2.1_llvm.tar.bz2 as it comes with LLVM 3.1 support compiled in.

Please keep in mind that it is not a static executable, so some minor dependencies may prevent it from loading.

Executable file is compressed with UPX, so it would not give the correct ldd output. Actual dependencies are listed on the release page. If you wish to see them directly, you may unpack the executable with upx -d llst command and then run ldd llst. This will show the external dependencies list and their current status (whether they were found or not).

P.S.: If you still wish to compile the llst yourself, you may install the LLVM 3.1 package either from your package manager or compile it from source. Then, in order to compile llst you should ensure that llvm-config-3.1 is accessible from the shell where cmake is invoked. If all is ok, you'll get the compiled version with the following command:

build$ cmake -DCMAKE_BUILD_TYPE=Release -DLLVM=ON -DLLVM_VERSION=3.1 .. && make

epitron commented 10 years ago

Sweet, the binary package works! No UPX/ldd necessary! :)

Arch doesn't have an LLVM 3.1 package available, so I'm just going to stick with the binary.

Do you know why the non-LLVM version had that readline typedef issue when I tried building it?

0x7CFE commented 10 years ago

Unfortunately, I have no idea why it happens. It's very strange because our project virtually does nothing special. It just uses the readline in a usual way. We just include the header and provide implementation of the required functions. And that's all. But the compilation issue you mentioned seemed to happen in the header itself, not in the our code.

I suppose that LLVM version will also fail. You just haven't hit it yet (due to LLVM 3.3 vs 3.1 issue).

epitron commented 10 years ago

Hmmm... maybe I'll run it by the Arch developers then. They might have seen this before.

kpp commented 10 years ago

I wrote you an email. Can you answer it? =)

kpp commented 10 years ago

arch_compile_readline

0x7CFE commented 10 years ago

LOL that was a nice one :)

epitron commented 10 years ago

Wow, weird bug.

Thanks for the fast and friendly suggestions and fixes!

0x7CFE commented 10 years ago

You are welcome :)

If you have any questions, feel free to ask. We'll be happy to help.

Btw, you may like to see this shellcast as a quick hack-in tutorial: http://showterm.io/94fe5d4c659f513c16918#fast

epitron commented 10 years ago

Impressive!