Building qml from source on m32

Has anybody successfully built qml on m32? I download the git repo from https://github.com/zholos/qml and run

./configure KXARCH=m32

q operating system… m32 (selected)

q version… 3 (default)

q home… /Users/morten/q (default)

looking for GNU make… make

looking for C compiler… gcc (default)

checking if C compiler compiles… yes

checking if C compiler links… yes

selecting C optimization options… -O2 -fno-strict-aliasing

selecting C floating-point options… -ffloat-store

looking for C compiler for build-time programs… gcc (default)

checking if build-time C compiler compiles… yes

checking if build-time C compiler links… yes

checking if build-time C compiler output runs… yes

looking for Fortran compiler… gfortran (default)

checking if Fortran compiler compiles… yes

checking if Fortran compiler links… yes

selecting Fortran optimization options… -O2

selecting Fortran floating-point options… -ffloat-store

selecting Fortran thread safety options… -frecursive

looking for binutils… ar (default)

selecting target options… -m32

selecting additional compiler options… -pipe

selecting shared library options… -fPIC

selecting how to export specific symbols… not found

couldn’t export specific symbols.


I’m on KDB+ 3.2 2014.10.04.


Thanks.

In recent OS X / XCode releases /usr/bin/gcc is just a symlink to Clang. The step it’s failing on is:

           LD_EXPORT ld_export \
           -Wl,–version-script -Wl,-M -exported_symbols_list

and I don’t think -exported_symbols_list is a supported option for Clang. If you look at conftest.err you will see a more detailed error.

So I think you’ll need 32bit c and fortran libraries, a copy of gcc and possibly other GNU tools (e.g. ld, nm) to get it all working. And for that reason I haven’t either :)

James

Did you ever get this compiled? Would you mind sharing the binary? 

Hi Emil, you can find the binaries here https://github.com/Phonebooth/qml

Thanks for the info guys! Has anyone had any access with w64 version though?

I got to as far as 

\l qml.q

*only* after commenting this line 

version:const 0;pi:const 1;e:const 2;eps:const 3;

because otherwise it would give a 'type error. Then again even with that hack (which I’m not sure if it’s legit anyway) I tried running a quick test like 

.qml.mchol (1 2 1;2 5 4;1 4 6)   

and then it crashed my KDB instance.

I have no clue what’s going on and how to get that to work. Help pls..

<o:p> </o:p>

.qml.mchol expects the arguments to be of type float. It might help if you cast it to float.<o:p></o:p>

<o:p> </o:p>

q) .qml.mchol `float$(1 2 1;2 5 4;1 4 6) <o:p></o:p>

<o:p> </o:p>

But I suspect you compiled qml for 2.8 instead 3.2.<o:p></o:p>

<o:p> </o:p>

Can you just let us know what you did, where  you have downloaded the source or binary?<o:p></o:p>

<o:p> </o:p>

HTH,<o:p></o:p>

<o:p> </o:p>

Kim<o:p></o:p>

<o:p> </o:p>

Von: personal-kdbplus@googlegroups.com [mailto:personal-kdbplus@googlegroups.com] Im Auftrag von Kendall Lo
Gesendet: Donnerstag, 5. März 2015 00:04
An: personal-kdbplus@googlegroups.com
Betreff: [personal kdb+] Re: Building qml from source on m32<o:p></o:p>

<o:p> </o:p>

Thanks for the info guys! Has anyone had any access with w64 version though?<o:p></o:p>

<o:p> </o:p>

I got to as far as <o:p></o:p>

<o:p> </o:p>

\l qml.q<o:p></o:p>

<o:p> </o:p>

*only* after commenting this line <o:p></o:p>

<o:p> </o:p>

version:const 0;pi:const 1;e:const 2;eps:const 3;<o:p></o:p>

<o:p> </o:p>

because otherwise it would give a 'type error. Then again even with that hack (which I’m not sure if it’s legit anyway) I tried running a quick test like <o:p></o:p>

<o:p> </o:p>

.qml.mchol (1 2 1;2 5 4;1 4 6)   <o:p></o:p>

<o:p> </o:p>

and then it crashed my KDB instance.<o:p></o:p>

<o:p> </o:p>

I have no clue what’s going on and how to get that to work. Help pls..<o:p></o:p>

<o:p> </o:p>

<o:p> </o:p>

On Monday, February 9, 2015 at 10:33:54 PM UTC+8, Morten Sorensen wrote:<o:p></o:p>

Hi Emil, you can find the binaries here https://github.com/Phonebooth/qml

Ok I did not compile it. I grabbed only the latest available binary I could find qml-0.2.1.zip which I know is a bit old. I’m using w64 on a Windows machine however so I was trying to get something out of the box without having to go through using MinGW to compile from source. <o:p></o:p>

<o:p> </o:p>

So the only change that I did was changing inside qml.q to point to the location where I’m storing qml.dll.<o:p></o:p>

<o:p> </o:p>

{@[x;y;z]}./:{({x[3] set x[0]2:(`$x 4;x 2)};x,y;<o:p></o:p>

    {'`$"loading “,x[4],”() from “,x[1],”: ",y}[x,y])}[<o:p></o:p>

        {x[;(-1+ count x 1)^ first where { count inv `$“:”,x} each -1_x 1]}<o:p></o:p>

            {(`$x;x,:$[.z.o like"w*“;”.dll";“.so”])}<o:p></o:p>

                ( “D:/dev/kdb/qml/”** ; **“D:/dev/kdb/qml/” , string [.z.o],“/”;“”),:“qml”] each<o:p></o:p>

        {(x 0;x 1;“qml_”, string x 1)} each raze flip each flip (1 2 3 4;(<o:p></o:p>

            sincostanasinacosatansinhcoshtanhasinhacoshatanh,<o:p></o:p>

                expexpm1loglog10logblog1psqrtcbrtfloorceil`fabs,<o:p></o:p>

                erferfclgammagammaj0j1y0y1ncdfnicdfkcdfkicdf,<o:p></o:p>

                mdetminvmevumcholmqrmqrpmlupmsvdpolyconst;<o:p></o:p>

            atan2powhypotfmodbetapgammarpgammarcipgammarc,<o:p></o:p>

                c2cdfc2icdfstcdfsticdfpscdfpsicdfsmcdfsmicdf,<o:p></o:p>

                solvemin`root;<o:p></o:p>

            pbetaripbetarfcdfficdfgcdfgicdfbncdfbnicdf,<o:p></o:p>

                solvexminxrootxconmin`line;<o:p></o:p>

            conminxlinex));<o:p></o:p>

<o:p> </o:p>

<o:p> </o:p>

<o:p> </o:p>

Am I missing something else? In particular, it fails on this line (if I don’t comment it out)<o:p></o:p>

<o:p> </o:p>

version:const 0;pi:const 1;e:const 2;eps:const 3;<o:p></o:p>

<o:p> </o:p>

<o:p> </o:p>

Thanks!<o:p></o:p>

<o:p> </o:p>

<o:p> </o:p>

From: personal-kdbplus@googlegroups.com [mailto:personal-kdbplus@googlegroups.com] On Behalf Of Kim Tang
Sent: Thursday, March 05, 2015 4:57 AM
To: personal-kdbplus@googlegroups.com
Subject: AW: [personal kdb+] Re: Building qml from source on m32<o:p></o:p>

<o:p> </o:p>

<o:p> </o:p>

.qml.mchol expects the arguments to be of type float. It might help if you cast it to float.<o:p></o:p>

<o:p> </o:p>

q) .qml.mchol `float$(1 2 1;2 5 4;1 4 6) <o:p></o:p>

<o:p> </o:p>

But I suspect you compiled qml for 2.8 instead 3.2.<o:p></o:p>

<o:p> </o:p>

Can you just let us know what you did, where  you have downloaded the source or binary?<o:p></o:p>

<o:p> </o:p>

HTH,<o:p></o:p>

<o:p> </o:p>

Kim<o:p></o:p>

<o:p> </o:p>

Von: personal-kdbplus@googlegroups.com [mailto:personal-kdbplus@googlegroups.com] Im Auftrag von Kendall Lo
Gesendet: Donnerstag, 5. März 2015 00:04
An: personal-kdbplus@googlegroups.com
Betreff: [personal kdb+] Re: Building qml from source on m32<o:p></o:p>

<o:p> </o:p>

Thanks for the info guys! Has anyone had any access with w64 version though?<o:p></o:p>

<o:p> </o:p>

I got to as far as <o:p></o:p>

<o:p> </o:p>

\l qml.q<o:p></o:p>

<o:p> </o:p>

*only* after commenting this line <o:p></o:p>

<o:p> </o:p>

version:const 0;pi:const 1;e:const 2;eps:const 3;<o:p></o:p>

<o:p> </o:p>

because otherwise it would give a 'type error. Then again even with that hack (which I’m not sure if it’s legit anyway) I tried running a quick test like <o:p></o:p>

<o:p> </o:p>

.qml.mchol (1 2 1;2 5 4;1 4 6)   <o:p></o:p>

<o:p> </o:p>

and then it crashed my KDB instance.<o:p></o:p>

<o:p> </o:p>

I have no clue what’s going on and how to get that to work. Help pls..<o:p></o:p>

<o:p> </o:p>

<o:p> </o:p>

On Monday, February 9, 2015 at 10:33:54 PM UTC+8, Morten Sorensen wrote:<o:p></o:p>

Hi Emil, you can find the binaries here https://github.com/Phonebooth/qml

qml-0.2.1 is only suitable for kdb2.8 .<o:p></o:p>

<o:p> </o:p>

Unfortunately u need to download the source and compile it by yourself for k3.2. Or you can use the one attached compiled for w32 and k3.2. Just rename qml.txt to qml.dll.<o:p></o:p>

<o:p> </o:p>

Kim<o:p></o:p>

<o:p> </o:p>

<o:p> </o:p>

Von: personal-kdbplus@googlegroups.com [mailto:personal-kdbplus@googlegroups.com] Im Auftrag von Kendall Lo
Gesendet: Donnerstag, 5. März 2015 22:08
An: personal-kdbplus@googlegroups.com
Betreff: RE: [personal kdb+] Re: Building qml from source on m32<o:p></o:p>

<o:p> </o:p>

Ok I did not compile it. I grabbed only the latest available binary I could find qml-0.2.1.zip which I know is a bit old. I’m using w64 on a Windows machine however so I was trying to get something out of the box without having to go through using MinGW to compile from source. <o:p></o:p>

<o:p> </o:p>

So the only change that I did was changing inside qml.q to point to the location where I’m storing qml.dll.<o:p></o:p>

<o:p> </o:p>

[{@[x;y;z]}./:{({x[3] set ](“mailto:%7b@[x;y;z]%7d./:%7b(%7bx%5b3%5dset”) x[0]2:(`$x 4;x 2)};x,y;<o:p></o:p>

    {'`$"loading “,x[4],”() from “,x[1],”: ",y}[x,y])}[<o:p></o:p>

        {x[;(-1+ count x 1)^ first where { count inv `$“:”,x} each -1_x 1]}<o:p></o:p>

            {(`$x;x,:$[.z.o like"w*“;”.dll";“.so”])}<o:p></o:p>

                ( “D:/dev/kdb/qml/”** ; **“D:/dev/kdb/qml/” , string [.z.o],“/”;“”),:“qml”] each<o:p></o:p>

        {(x 0;x 1;“qml_”, string x 1)} each raze flip each flip (1 2 3 4;(<o:p></o:p>

            sincostanasinacosatansinhcoshtanhasinhacoshatanh,<o:p></o:p>

                expexpm1loglog10logblog1psqrtcbrtfloorceil`fabs,<o:p></o:p>

                erferfclgammagammaj0j1y0y1ncdfnicdfkcdfkicdf,<o:p></o:p>

                mdetminvmevumcholmqrmqrpmlupmsvdpolyconst;<o:p></o:p>

            atan2powhypotfmodbetapgammarpgammarcipgammarc,<o:p></o:p>

                c2cdfc2icdfstcdfsticdfpscdfpsicdfsmcdfsmicdf,<o:p></o:p>

                solvemin`root;<o:p></o:p>

            pbetaripbetarfcdfficdfgcdfgicdfbncdfbnicdf,<o:p></o:p>

                solvexminxrootxconmin`line;<o:p></o:p>

            conminxlinex));<o:p></o:p>

<o:p> </o:p>

<o:p> </o:p>

<o:p> </o:p>

Am I missing something else? In particular, it fails on this line (if I don’t comment it out)<o:p></o:p>

<o:p> </o:p>

version:const 0;pi:const 1;e:const 2;eps:const 3;<o:p></o:p>

<o:p> </o:p>

<o:p> </o:p>

Thanks!<o:p></o:p>

<o:p> </o:p>

<o:p> </o:p>

From: personal-kdbplus@googlegroups.com [mailto:personal-kdbplus@googlegroups.com] On Behalf Of Kim Tang
Sent: Thursday, March 05, 2015 4:57 AM
To: personal-kdbplus@googlegroups.com
Subject: AW: [personal kdb+] Re: Building qml from source on m32<o:p></o:p>

<o:p> </o:p>

<o:p> </o:p>

.qml.mchol expects the arguments to be of type float. It might help if you cast it to float.<o:p></o:p>

<o:p> </o:p>

q) .qml.mchol `float$(1 2 1;2 5 4;1 4 6) <o:p></o:p>

<o:p> </o:p>

But I suspect you compiled qml for 2.8 instead 3.2.<o:p></o:p>

<o:p> </o:p>

Can you just let us know what you did, where  you have downloaded the source or binary?<o:p></o:p>

<o:p> </o:p>

HTH,<o:p></o:p>

<o:p> </o:p>

Kim<o:p></o:p>

<o:p> </o:p>

Von: personal-kdbplus@googlegroups.com [mailto:personal-kdbplus@googlegroups.com] Im Auftrag von Kendall Lo
Gesendet: Donnerstag, 5. März 2015 00:04
An: personal-kdbplus@googlegroups.com
Betreff: [personal kdb+] Re: Building qml from source on m32<o:p></o:p>

<o:p> </o:p>

Thanks for the info guys! Has anyone had any access with w64 version though?<o:p></o:p>

<o:p> </o:p>

I got to as far as <o:p></o:p>

<o:p> </o:p>

\l qml.q<o:p></o:p>

<o:p> </o:p>

*only* after commenting this line <o:p></o:p>

<o:p> </o:p>

version:const 0;pi:const 1;e:const 2;eps:const 3;<o:p></o:p>

<o:p> </o:p>

because otherwise it would give a 'type error. Then again even with that hack (which I’m not sure if it’s legit anyway) I tried running a quick test like <o:p></o:p>

<o:p> </o:p>

.qml.mchol (1 2 1;2 5 4;1 4 6)   <o:p></o:p>

<o:p> </o:p>

and then it crashed my KDB instance.<o:p></o:p>

<o:p> </o:p>

I have no clue what’s going on and how to get that to work. Help pls..<o:p></o:p>

<o:p> </o:p>

<o:p> </o:p>

On Monday, February 9, 2015 at 10:33:54 PM UTC+8, Morten Sorensen wrote:<o:p></o:p>

Hi Emil, you can find the binaries here https://github.com/Phonebooth/qml