Re: [fityk-users] failed to build fytik 1.2 under ubuntu 12.04 (lua issue)

520 views
Skip to first unread message

Marcin Wojdyr

unread,
Oct 18, 2012, 5:26:53 AM10/18/12
to fityk...@googlegroups.com
On 18 October 2012 09:30, Jean-Patrick Pommier
<jeanpatri...@gmail.com> wrote:

> checking lua.h usability... yes
> checking lua.h presence... yes
> checking for lua.h... yes
> checking lualib.h usability... yes
> checking lualib.h presence... yes
> checking for lualib.h... yes
> checking lua.h version is in range 501 <= v < 503... (found Lua 5.1, 501)...
> yes
> checking for exp in -lm... yes
> checking for dlopen in -ldl... yes
> checking for lua_load in -lluayes... no
> configure: error: Lua library not found. You may try option
> --with-lua-suffix.
>
> I can't find lua_load in ubuntu repository (most lua stuff is installed) nor
> I don't know what to do with the option --with-lua-suffix
>
> I tried different options with ./configure:
>
> ./configure --enable-python
> ./configure --enable-python CPPFLAGS="-I/usr/include/lua5.1"
> ./configure --enable-python --with-lua-suffix
> CPPFLAGS="-I/usr/include/lua5.1"

Looking at:
http://packages.ubuntu.com/precise/i386/liblua5.1-0-dev/filelist
lua library is at:
/usr/lib/i386-linux-gnu/liblua5.1.so
Try --with-lua-suffix=5.1
I don't know if /usr/lib/i386-linux-gnu/ path is included by default,
if not, you may need also LDFLAGS=-L/usr/lib/i386-linux-gnu/

HTH
Marcin

Jean-Patrick Pommier

unread,
Oct 20, 2012, 7:52:05 AM10/20/12
to fityk...@googlegroups.com
Thanks,
Configuration went fine with:

./configure --enable-python --with-lua-suffix=5.1 CPPFLAGS="-I/usr/include/lua5.1"

but now, make failed with the error:

ui.cpp:27:56: fatal error: swig/luarun.h: No such file or directory
compilation terminated.
make[3]: *** [libfityk_la-ui.lo] Erreur 1

The problem is solved by installing swig. It seems that mpfit must be installed too:

MPfit.h:11:26: fatal error: cmpfit/mpfit.h: No such file or directory
compilation terminated.
make[3]: *** [libfityk_la-fit.lo] Erreur 1

But I don't know how to install it.

Le jeudi 18 octobre 2012 10:30:42 UTC+2, Jean-Patrick Pommier a écrit :
Dear all,
Since Fytik  0.9 available in Ubuntu is instable, I try to build fytik 1.2 under ubuntu 12.04 (32 bits)

  • wxwindow 2.9 was build from source.
  • dependencies were checked with synaptics, particularly .dev files
The ./configure step failed when checking some lua files as follow:
...
checking python extra linking flags... -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions
checking consistency of all components of python development environment... yes

checking lua.h usability... yes
checking lua.h presence... yes
checking for lua.h... yes
checking lualib.h usability... yes
checking lualib.h presence... yes
checking for lualib.h... yes
checking lua.h version is in range 501 <= v < 503... (found Lua 5.1, 501)... yes
checking for exp in -lm... yes
checking for dlopen in -ldl... yes
checking for lua_load in -lluayes... no
configure: error: Lua library not found. You may try option --with-lua-suffix.

I can't find lua_load in ubuntu repository (most lua stuff is installed) nor I don't know what to do with the option --with-lua-suffix

I tried different options with ./configure:

  1. ./configure --enable-python
  2. ./configure --enable-python CPPFLAGS="-I/usr/include/lua5.1"
  3. ./configure --enable-python --with-lua-suffix CPPFLAGS="-I/usr/include/lua5.1"
Thank you for your advices.

Jean-Patrick


Marcin Wojdyr

unread,
Oct 20, 2012, 10:27:03 AM10/20/12
to fityk...@googlegroups.com
Both swig/luarun.h and cmpfit/mpfit.h should be in the tarball.
If you got sources from git see the INSTALL file.
Marcin

On 20 October 2012 12:52, Jean-Patrick Pommier
> --
> http://groups.google.com/group/fityk-users

Jean-Patrick Pommier

unread,
Oct 20, 2012, 1:16:44 PM10/20/12
to fityk...@googlegroups.com
I got source from git,
 Sorry I missed the cmpfit step, now fixed.

So I do:
  • autoreconf -iv
  • ./configure --enable-python --with-lua-suffix=5.1 CPPFLAGS="-I/usr/include/lua5.1"
  • make clean
  • make

and make fails with a swig issue:

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include/python2.7 -I. -I/usr/include/lua5.1 -g -O2 -MT swig/swig__fityk_la-fityk_python.lo -MD -MP -MF swig/.deps/swig__fityk_la-fityk_python.Tpo -c swig/fityk_python.cpp  -fPIC -DPIC -o swig/.libs/swig__fityk_la-fityk_python.o
swig/fityk_python.cpp:4861:23: error: redefinition of 'struct swig::traits_asval<double>'
swig/fityk_python.cpp:4571:23: error: previous definition of 'struct swig::traits_asval<double>'
swig/fityk_python.cpp:4871:23: error: redefinition of 'struct swig::traits_from<double>'
swig/fityk_python.cpp:4577:23: error: previous definition of 'struct swig::traits_from<double>'
make[3]: *** [swig/swig__fityk_la-fityk_python.lo] Erreur 1
make[3]: quittant le répertoire « /home/simon/Applications/wojdyr-fityk-3172c77/fityk »
make[2]: *** [all] Erreur 2
make[2]: quittant le répertoire « /home/simon/Applications/wojdyr-fityk-3172c77/fityk »
make[1]: *** [all-recursive] Erreur 1
make[1]: quittant le répertoire « /home/simon/Applications/wojdyr-fityk-3172c77 »
make: *** [all] Erreur 2


I have installed swig from repo (ubuntu 12.04)

Jp

PS

fytik 0.9 from ubuntu repo crashed once but after, I succeed to fit some functions on a dataset easily.

Marcin Wojdyr

unread,
Oct 21, 2012, 11:50:29 PM10/21/12
to fityk...@googlegroups.com
You may try again, that problem should be fixed now.

Note that you need swig only to compile git snapshots. It is easier
to use tarball from the last release (also available on github).
Marcin

On 20 October 2012 18:16, Jean-Patrick Pommier
> --
> http://groups.google.com/group/fityk-users

Jean-Patrick Pommier

unread,
Oct 22, 2012, 7:20:54 AM10/22/12
to fityk...@googlegroups.com
hi,
with the new git version:

autoreconf -iv && ./configure --enable-python --with-lua-suffix=5.1 CPPFLAGS="-I/usr/include/lua5.1" && make clean && make


make succeeds and ends by:

/bin/bash ./libtool  --tag=CXX   --mode=link g++  -g -O2   -o cli/cfityk cli/gnuplot.o cli/main.o fityk/libfityk.la  -lm  -lreadline
libtool: link: g++ -g -O2 -o cli/.libs/cfityk cli/gnuplot.o cli/main.o  fityk/.libs/libfityk.so -lm -lreadline
make[2]: quittant le répertoire « /home/simon/Applications/wojdyr-fityk-d8774a9 »
make[1]: quittant le répertoire « /home/simon/Applications/wojdyr-fityk-d8774a9 »

but sudo make install failed:

make  install-data-hook
make[3]: entrant dans le répertoire « /home/simon/Applications/wojdyr-fityk-d8774a9 »
/bin/mkdir -p "/usr/local/share/fityk/html"
cp -fR ./doc/html/* "/usr/local/share/fityk/html" && \
        chmod -R u+w "/usr/local/share/fityk/html"
cp: impossible d'évaluer «./doc/html/*»: Aucun fichier ou dossier de ce type
make[3]: *** [install-data-hook] Erreur 1
make[3]: quittant le répertoire « /home/simon/Applications/wojdyr-fityk-d8774a9 »
make[2]: *** [install-data-am] Erreur 2
make[2]: quittant le répertoire « /home/simon/Applications/wojdyr-fityk-d8774a9 »
make[1]: *** [install-am] Erreur 2
make[1]: quittant le répertoire « /home/simon/Applications/wojdyr-fityk-d8774a9 »
make: *** [install-recursive] Erreur 1

I tried to start fytik without success as follow:
:/usr/local/bin$ cfityk
cfityk: error while loading shared libraries: libfityk.so.4: cannot open shared object file: No such file or directory

Marcin Wojdyr

unread,
Oct 22, 2012, 7:27:38 AM10/22/12
to fityk...@googlegroups.com
On 22 October 2012 12:20, Jean-Patrick Pommier
<jeanpatri...@gmail.com> wrote:

> make install-data-hook
> make[3]: entrant dans le répertoire «
> /home/simon/Applications/wojdyr-fityk-d8774a9 »
> /bin/mkdir -p "/usr/local/share/fityk/html"
> cp -fR ./doc/html/* "/usr/local/share/fityk/html" && \
> chmod -R u+w "/usr/local/share/fityk/html"
> cp: impossible d'évaluer «./doc/html/*»: Aucun fichier ou dossier de ce type

see the INSTALL file,
/Building manual

Jean-Patrick Pommier

unread,
Oct 23, 2012, 2:55:27 AM10/23/12
to fityk...@googlegroups.com
Sorry to bother every one again,

Restarting from the beginning:

~/Applications/wojdyr-fityk-d8774a9$ autoreconf -iv && ./configure --enable-python --with-lua-suffix=5.1 CPPFLAGS="-I/usr/include/lua5.1" && make clean && make

no error message, then "sudo make install" worked too with the message at the end:

make[3]: entrant dans le répertoire « /home/simon/Applications/wojdyr-fityk-d8774a9 »
/bin/mkdir -p "/usr/local/share/fityk/html"
cp -fR ./doc/html/* "/usr/local/share/fityk/html" && \
        chmod -R u+w "/usr/local/share/fityk/html"
make[3]: quittant le répertoire « /home/simon/Applications/wojdyr-fityk-d8774a9 »
make[2]: quittant le répertoire « /home/simon/Applications/wojdyr-fityk-d8774a9 »
make[1]: quittant le répertoire « /home/simon/Applications/wojdyr-fityk-d8774a9 »

but fityk doesn't start:
$ fityk

chri...@shamanbenefit.net

unread,
Oct 23, 2012, 3:27:15 AM10/23/12
to fityk...@googlegroups.com
Try "sudo ldconfig".


----- Original Message -----
From: jeanpatri...@gmail.com
To: fityk...@googlegroups.com
Date: 23.10.2012 08:55:27
Subject: [fityk-users] Re: failed to build fytik 1.2 under ubuntu 12.04 (lua issue)


> Sorry to bother every one again,
>
> Restarting from the beginning:
>
> *~/Applications/wojdyr-fityk-d8774a9$ autoreconf -iv && ./configure
> --enable-python --with-lua-suffix=5.1 CPPFLAGS="-I/usr/include/lua5.1" &&
> make clean && make*
>
> no error message, then "sudo make install" worked too with the message at
> the end:
>
> *make[3]: entrant dans le répertoire «
> /home/simon/Applications/wojdyr-fityk-d8774a9 »*
> */bin/mkdir -p "/usr/local/share/fityk/html"*
> *cp -fR ./doc/html/* "/usr/local/share/fityk/html" && \*
> * chmod -R u+w "/usr/local/share/fityk/html"*
> *make[3]: quittant le répertoire «
> /home/simon/Applications/wojdyr-fityk-d8774a9 »*
> *make[2]: quittant le répertoire «
> /home/simon/Applications/wojdyr-fityk-d8774a9 »*
> *make[1]: quittant le répertoire «
> /home/simon/Applications/wojdyr-fityk-d8774a9 »*
>
> but fityk doesn't start:
> *$ fityk
> fityk: error while loading shared libraries: libfityk.so.4: cannot open
> shared object file: No such file or directory*
>
>
>
>
>
> Le jeudi 18 octobre 2012 10:30:42 UTC+2, Jean-Patrick Pommier a écrit :
>>
>> Dear all,
>> Since Fytik 0.9 available in Ubuntu is instable, I try to build fytik 1.2
>> under ubuntu 12.04 (32 bits)
>>
>>
>> - wxwindow 2.9 was build from source.
>>
>>
>> - dependencies were checked with synaptics, particularly .dev files
>>
>> The ./configure step failed when checking some lua files as follow:
>> ...
>> checking python extra linking flags... -Xlinker -export-dynamic -Wl,-O1
>> -Wl,-Bsymbolic-functions
>> checking consistency of all components of python development
>> environment... yes
>> checking lua.h usability... yes
>> checking lua.h presence... yes
>> checking for lua.h... yes
>> checking lualib.h usability... yes
>> checking lualib.h presence... yes
>> checking for lualib.h... yes
>> checking lua.h version is in range 501 <= v < 503... (found Lua 5.1,
>> 501)... yes
>> checking for exp in -lm... yes
>> checking for dlopen in -ldl... yes
>> checking for lua_load in -lluayes... no
>> configure: error: Lua library not found. You may try option
>> --with-lua-suffix.
>>
>> I can't find lua_load in ubuntu repository (most lua stuff is installed)
>> nor I don't know what to do with the option* --with-lua-suffix*
>>
>> I tried different options with ./configure:
>>
>>
>> 1. ./configure --enable-python
>> 2. ./configure --enable-python CPPFLAGS="-I/usr/include/lua5.1"
>> 3. ./configure --enable-python --with-lua-suffix
>> CPPFLAGS="-I/usr/include/lua5.1"
>>
>> Thank you for your advices.
>>
>> Jean-Patrick
>>
>>
>>
>
> --
> http://groups.google.com/group/fityk-users

Jean-Patrick Pommier

unread,
Oct 23, 2012, 3:36:41 AM10/23/12
to fityk...@googlegroups.com

Thank you, that's it!

Jean-pat
Reply all
Reply to author
Forward
0 new messages