ANN: Pure 0.45 et al

0 views
Skip to first unread message

Albert Graef

unread,
Oct 31, 2010, 1:56:25 PM10/31/10
to pure...@googlegroups.com
Pure 0.45 is out. The most prominent sign of progress in this release is
the revision of the C interface (various improvements in the bitcode
loader, inline C/C++/Fortran/Faust code, full checking of pointer types,
and a few other changes); please check the NEWS file for details:

http://pure-lang.googlecode.com/hg/pure/NEWS

Note: If one of your scripts stops working, it's probably because of the
new strict pointer type checking in the C interface, so you'll have to
look at your extern declarations and maybe make judicious use of type
casting and the other pointer tag operations in the library. The
relevant sections in the manual are:

http://wiki.pure-lang.googlecode.com/hg/docs/pure.html#c-interface
http://wiki.pure-lang.googlecode.com/hg/docs/purelib.html#tagged-pointers

Various library modules had to be fixed, too, so along with Pure 0.45 I
also released pure-fastcgi, pure-ffi, pure-gsl, pure-gtk and pure-liblo.
(pure-csv lags behind a bit, Eddie is still working on it, so you'll
have to use the latest pure-csv from the repository for now. Please
check http://code.google.com/p/pure-lang/source/browse/pure-csv/.)

For your convenience, here is the list of new source tarballs waiting
for you, so grab them while they're hot:

http://pure-lang.googlecode.com/files/pure-0.45.tar.gz
http://pure-lang.googlecode.com/files/pure-fastcgi-0.2.tar.gz
http://pure-lang.googlecode.com/files/pure-ffi-0.10.tar.gz
http://pure-lang.googlecode.com/files/pure-gsl-0.9.tar.gz
http://pure-lang.googlecode.com/files/pure-gtk-0.8.tar.gz
http://pure-lang.googlecode.com/files/pure-liblo-0.5.tar.gz

The notorious Windows packages which go along with these:

http://pure-lang.googlecode.com/files/pure-0.45.msi
http://pure-lang.googlecode.com/files/pure-gtk-0.8.msi

Enjoy! :)
Albert

--
Dr. Albert Gr"af
Dept. of Music-Informatics, University of Mainz, Germany
Email: Dr.G...@t-online.de, a...@muwiinfa.geschichte.uni-mainz.de
WWW: http://www.musikinformatik.uni-mainz.de/ag

Ryan Schmidt

unread,
Oct 31, 2010, 6:48:32 PM10/31/10
to pure...@googlegroups.com

On Oct 31, 2010, at 12:56, Albert Graef wrote:

> Pure 0.45 is out.

I'm having trouble building this on Mac OS X 10.6.4 with llvm 2.8:


/usr/bin/g++-4.2 -o pure -L. -L/opt/local/lib -arch x86_64 pure.o -lpure -L/opt/local/lib -lpthread -lffi -lm -liconv -lm -lgmp -lreadline
Undefined symbols:
"llvm::GuaranteedTailCallOpt", referenced from:
_main in pure.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [pure] Error 1

Albert Graef

unread,
Oct 31, 2010, 7:00:53 PM10/31/10
to pure...@googlegroups.com
Ryan Schmidt wrote:
> I'm having trouble building this on Mac OS X 10.6.4 with llvm 2.8:

Hmm, do you have LLVM installed as a shared library? (You can easily
check this by taking a look at the generated pure/Makefile, it will then
have 'LLVM_LIBS = -lLLVM-2.8' in it.)

If so, then the OSX linker probably needs a -lLLVM-2.8 in the link line
of the pure executable. Does that help?

Ryan Schmidt

unread,
Oct 31, 2010, 7:14:54 PM10/31/10
to pure...@googlegroups.com
On Oct 31, 2010, at 18:00, Albert Graef wrote:
> Ryan Schmidt wrote:
>> I'm having trouble building this on Mac OS X 10.6.4 with llvm 2.8:
>
> Hmm, do you have LLVM installed as a shared library? (You can easily
> check this by taking a look at the generated pure/Makefile, it will then
> have 'LLVM_LIBS = -lLLVM-2.8' in it.)

It does have that...

> If so, then the OSX linker probably needs a -lLLVM-2.8 in the link line
> of the pure executable. Does that help?


...but our libLLVM-2.8.dylib does not appear to have been built properly:


dyld: Library not loaded: @executable_path/../lib/libLLVM-2.8.dylib
Referenced from: /opt/local/var/macports/build/_Users_rschmidt_macports_dports_lang_pure/work/pure-0.45/./conftest
Reason: image not found


I'll have to investigate that and get back to you.

I was surprised I couldn't find a parameter to llvm-config that would return "-lLLVM-2.8". I was also surprised llvm didn't provide any pkg-config files.

Albert Graef

unread,
Oct 31, 2010, 7:37:16 PM10/31/10
to pure...@googlegroups.com
Ryan Schmidt wrote:
> I was surprised I couldn't find a parameter to llvm-config that would return "-lLLVM-2.8".

Yeah, llvm-config is kind of broken, it will only spit out the static
libraries right now, even if the shared lib was installed. That's why I
added a config check for that.

The config check actually tries to link against the library, so I'm
surprised that it apparently succeeds even though you get that error
message when running it.

There are ways to work around these glitches, of course. If all else
fails, you might just set LLVM_LIBS as needed on the make line.

Ryan Schmidt

unread,
Oct 31, 2010, 9:06:05 PM10/31/10
to pure...@googlegroups.com
On Oct 31, 2010, at 18:14, Ryan Schmidt wrote:
> On Oct 31, 2010, at 18:00, Albert Graef wrote:
>> Ryan Schmidt wrote:
>>> I'm having trouble building this on Mac OS X 10.6.4 with llvm 2.8:
>>
>> Hmm, do you have LLVM installed as a shared library? (You can easily
>> check this by taking a look at the generated pure/Makefile, it will then
>> have 'LLVM_LIBS = -lLLVM-2.8' in it.)
>
> It does have that...
>
>> If so, then the OSX linker probably needs a -lLLVM-2.8 in the link line
>> of the pure executable. Does that help?
>
> ...but our libLLVM-2.8.dylib does not appear to have been built properly:

After fixing MacPorts llvm per this ticket...

http://trac.macports.org/ticket/27090

...and adding -lLLVM-2.8 to LDFLAGS as you said, pure 0.45 builds fine. Thanks!


Albert Graef

unread,
Nov 1, 2010, 8:25:58 AM11/1/10
to pure...@googlegroups.com
Ryan Schmidt wrote:
> After fixing MacPorts llvm per this ticket...
>
> http://trac.macports.org/ticket/27090
>
> ...and adding -lLLVM-2.8 to LDFLAGS as you said, pure 0.45 builds fine. Thanks!

This should be fixed now (revision ab8b4a47d1), so that the needed flag
gets added automatically when needed. Thanks for reporting!

Michel Salim

unread,
Nov 11, 2010, 5:29:05 PM11/11/10
to pure-lang


On Nov 1, 12:37 am, Albert Graef <Dr.Gr...@t-online.de> wrote:
> RyanSchmidtwrote:
> > I was surprised I couldn't find a parameter to llvm-config that would return "-lLLVM-2.8".
>
> Yeah, llvm-config is kind of broken, it will only spit out the static
> libraries right now, even if the shared lib was installed. That's why I
> added a config check for that.
>
I've just sent a patch to improve the detection of the dynamic
library; on Fedora we install LLVM with --libdir=%{_libdir}/llvm,
and when testing my prepared pure-0.45 update I was wondering what the
"LLVMFreeMachineCodeForFunction not found" was about.

http://code.google.com/p/pure-lang/issues/detail?id=47

The patch uses AC_CHECK_LIB's optional field for other_libraries to
pass the -L`$LLVMCONF --libdir` necessary to pick up the actual LLVM
location.

Best regards,

--
Michel Alexandre Salim
sal...@fedoraproject.org
Reply all
Reply to author
Forward
0 new messages