Building without prebuilt directory
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, LCMark
Building without prebuilt directory
Hi,
I'm trying to build Livecode for raspberry pi. It's a Linux with ARM processor, my problem is that there isn't any prebuilt Livecode for ARM processor.
Is there a way to build Livecode without using the prebuilt directory?
P.S What is perfect.lnx?
I'm trying to build Livecode for raspberry pi. It's a Linux with ARM processor, my problem is that there isn't any prebuilt Livecode for ARM processor.
Is there a way to build Livecode without using the prebuilt directory?
P.S What is perfect.lnx?
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
Building for RaspberryPi
Hi MaxV,
I'll answer your questions in reverse order: the perfect.lnx executable is a perfect hash generator; it generates a hash table (in the form of a C++ source file) used for looking up script keywords efficiently. As you rightly point out, it is an x86 executable and won't run on the RaspberryPi.
I've built LiveCode for the RPi myself and it can be a bit of a challenge. On an overclocked original model B (the one with 256MB rather than 512MB of RAM) running at 1GHz, building the release version of 6.5.0 with GCC 4.6 took around 90 minutes; I'd recommend building on a faster desktop machine if at all possible. Setting up the cross-compiler environment is a bit of a pain but only needs to be done once and the improved build times are worth it. I've written up some notes on this but they're not yet available on the website; I'm actually in the process of cleaning them up a bit ready for publication and they should be available soon.
The notes also contain instructions for building on the RPi itself. The main points of which are:
I'll post another message shortly to let you know when the notes are up as they're more comprehensive than my description here.
Good luck!
Fraser
I'll answer your questions in reverse order: the perfect.lnx executable is a perfect hash generator; it generates a hash table (in the form of a C++ source file) used for looking up script keywords efficiently. As you rightly point out, it is an x86 executable and won't run on the RaspberryPi.
I've built LiveCode for the RPi myself and it can be a bit of a challenge. On an overclocked original model B (the one with 256MB rather than 512MB of RAM) running at 1GHz, building the release version of 6.5.0 with GCC 4.6 took around 90 minutes; I'd recommend building on a faster desktop machine if at all possible. Setting up the cross-compiler environment is a bit of a pain but only needs to be done once and the improved build times are worth it. I've written up some notes on this but they're not yet available on the website; I'm actually in the process of cleaning them up a bit ready for publication and they should be available soon.
The notes also contain instructions for building on the RPi itself. The main points of which are:
- Some files get generated using the pre-built executables. The easiest way to deal with these is to built LiveCode normally on an x86/x86_64 machine and copy the files to the RPi.
- The RPi framebuffer is (by default) 16-bit colour which the engine doesn't handle well. Change it in the /boot/config.txt file to 32-bit
- There are some other miscellaneous oddities; I have a git branch at https://github . com/runrevfraser/livecode.git called feature-rpi with some fixes (version 6.5.0)
I'll post another message shortly to let you know when the notes are up as they're more comprehensive than my description here.
Good luck!
Fraser
Re: Building wuthout prebuilt directory
Fraser, thank you for your support! I felt so lonely in the ARM processor field. I'm waiting your notes greedly
I don't want to cross compile, I have all the time to compile on raspberry pi.
![Mr. Green :mrgreen:](./images/smilies/icon_mrgreen.gif)
I don't want to cross compile, I have all the time to compile on raspberry pi.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
Re: Building wuthout prebuilt directory
The LiveCode IDE isn't exactly blindingly fast on the RPi but it's not bad. Certainly fun to play around with.
If you have any other questions, please feel free to get in touch. We don't officially support RPi but I'm willing to help out when I have the time. There are probably a few RPi-specific bugs lurking around but hopefully nothing too bad. We build for ARM for iPhones and iPads and support x86 Linux so I'd like to think ARM Linux should work reasonably well. Once I get the notes sorted out, I'll create a thread pointing to them so if you post any problems/comments/etc to that it'll be useful for anyone else with an interest in LC on RPi.
Out of interest, what model of RPi are you building on? The newer model B's with 512MB of RAM should be a decent bit faster as they'll swap a lot less. Having a fast SD card should also help; the one I have is quite slow and ends up being a bottleneck when archiving the static libraries and doing the final link.
If you have any other questions, please feel free to get in touch. We don't officially support RPi but I'm willing to help out when I have the time. There are probably a few RPi-specific bugs lurking around but hopefully nothing too bad. We build for ARM for iPhones and iPads and support x86 Linux so I'd like to think ARM Linux should work reasonably well. Once I get the notes sorted out, I'll create a thread pointing to them so if you post any problems/comments/etc to that it'll be useful for anyone else with an interest in LC on RPi.
Out of interest, what model of RPi are you building on? The newer model B's with 512MB of RAM should be a decent bit faster as they'll swap a lot less. Having a fast SD card should also help; the one I have is quite slow and ends up being a bottleneck when archiving the static libraries and doing the final link.
Re: Building wuthout prebuilt directory
You are right, I have the new model B with 512mb and the new raspberry SD (8Gb!).
I still didn't look your branch, but my first question is: I'll prepare the generated files on another Linux, but how I can tell to the makefile to avoid using the prebuild directory to create them again?![Embarassed :oops:](./images/smilies/icon_redface.gif)
My second question is: what is the difference between ??
P.S. I just added in /boot/config.txt
I still didn't look your branch, but my first question is: I'll prepare the generated files on another Linux, but how I can tell to the makefile to avoid using the prebuild directory to create them again?
![Embarassed :oops:](./images/smilies/icon_redface.gif)
My second question is: what is the difference between ??
P.S. I just added in /boot/config.txt
Code: Select all
framebuffer_depth=32
Last edited by MaxV on Fri Dec 06, 2013 5:57 pm, edited 1 time in total.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
Re: Building wuthout prebuilt directory
If the copied files are newer than the files from which they get generated, the Makefile won't re-generate them so the pre-built tools won't get called. You could disable the lines in the Makefile that cause them to be generated but having the build fail due to trying to re-generate them is a helpful hint that they are out of date. Strange things can happen when the generated files contain old contents!
The livecode-ide repository contains the LiveCode stacks for the IDE while the livecode repo contains the code for the engine. There is also a livecode-prebuilt which contains the pre-built tools and a livecode-thirdparty which contains the sources for the libraries that get built into LiveCode but we didn't write ourselves. Running git submodule update ensures that these other repos are up-to-date for the version of LiveCode you have checked out.
The livecode-ide repository contains the LiveCode stacks for the IDE while the livecode repo contains the code for the engine. There is also a livecode-prebuilt which contains the pre-built tools and a livecode-thirdparty which contains the sources for the libraries that get built into LiveCode but we didn't write ourselves. Running git submodule update ensures that these other repos are up-to-date for the version of LiveCode you have checked out.
Re: Building wuthout prebuilt directory
Great to see you working on this @runrevfraser. I'll need to dust off my Pi.
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/
Re: Building wuthout prebuilt directory
I'm trying compilation on a normal Linux x86 VM, I did:
and I get the following error:
What is the problem?
I read the file sslstubs.cpp and the first guity line is:
Is the file created wrong?
I suspect the ",," and ",)" are wrong?
Is it correct to remove the excessive commas?
Code: Select all
sudo apt-get update
sudo apt-get install make gcc g++ libX11-dev libXext-dev libXrender-dev libXft-dev libXinerama-dev libXv-dev libXcursor-dev libfreetype6-dev libgtk2.0-dev libpopt-dev libesd0-dev liblcms-dev
git clone --recursive https://github.com/runrev/livecode.git
cd livecode
MODE=release make development
Code: Select all
make[1]: Entering directory `/home/max/livecode/thirdparty/libopenssl'
mkdir -p ../../_cache/linux/i386/release/libopenssl/./
gcc -O2 -fvisibility=hidden -g -I./include -I./src -I../../engine/include -I../../libcore/include -I../../libexternal/include -I../../libgraphics/include -I../../thirdparty/libiodbc/include -I../../thirdparty/libjpeg/include -I../../thirdparty/libmysql/include -I../../thirdparty/libpcre/include -I../../thirdparty/libpng/include -I../../thirdparty/libgif/include -I../../thirdparty/libpq/include -I../../thirdparty/libsqlite/include -I../../thirdparty/libxml/include -I../../thirdparty/libxslt/include -I../../thirdparty/libz/include -I../../thirdparty/libzip/include -I../../thirdparty/libopenssl/include -I../../thirdparty/libcurl/include -I../../thirdparty/libskia/include/core -I../../thirdparty/libskia/include/config -I../../thirdparty/libskia/include/effects -I/usr/include/gtk-2.0 -I/usr/lib/i386-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/gtk-unix-print-2.0 -I../../thirdparty/headers/linux/include -I../../thirdparty/headers/linux/include/cairo -D_LINUX -DTARGET_PLATFORM_POSIX -D_RELEASE -DNDEBUG -D__LITTLE_ENDIAN__ -MMD -MF ../../_cache/linux/i386/release/libopenssl/sslstubs.d -c -o../../_cache/linux/i386/release/libopenssl/sslstubs.o ./src/sslstubs.cpp
./src/sslstubs.cpp:67:58: error: expected identifier before ‘,’ token
./src/sslstubs.cpp:67:72: error: expected identifier before ‘,’ token
./src/sslstubs.cpp:67:86: error: expected identifier before ‘,’ token
./src/sslstubs.cpp:67:98: error: expected identifier before ‘)’ token
...
A LOT OF ERROR LIKE THESE
...
./src/sslstubs.cpp:2682:44: error: expected primary-expression before ‘)’ token
make[1]: *** [../../_cache/linux/i386/release/libopenssl/sslstubs.o] Error 1
make[1]: Leaving directory `/home/max/livecode/thirdparty/libopenssl'
make: *** [libopenssl] Error 2
I read the file sslstubs.cpp and the first guity line is:
Code: Select all
typedef int (*EVP_CipherInit_t)(void *pArg1, void *pArg2,, void *pArg3,, void *pArg4,, int pArg5,);
I suspect the ",," and ",)" are wrong?
Is it correct to remove the excessive commas?
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
Re: Building without prebuilt directory
I'm still working on x86 Linux:
I investigated and I believe that "Revolution.lnx" prebuilt binary produce wrong .cpp files.
It produces wrong .cpp files with missing or wrong variables like: pArg1, pArg2, pArg3, pArg4, pArg5
![Shocked :shock:](./images/smilies/icon_eek.gif)
And now?
Do you have a good set of the .cpp files?
I investigated and I believe that "Revolution.lnx" prebuilt binary produce wrong .cpp files.
It produces wrong .cpp files with missing or wrong variables like: pArg1, pArg2, pArg3, pArg4, pArg5
![Shocked :shock:](./images/smilies/icon_eek.gif)
And now?
Do you have a good set of the .cpp files?
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: Building without prebuilt directory
Hi MaxV,
I'm not sure I'm adding anything but:
http://livecode.com/blog/2013/02/20/liv ... pberry-pi/
If you haven't seen it.
Simon
I'm not sure I'm adding anything but:
http://livecode.com/blog/2013/02/20/liv ... pberry-pi/
If you haven't seen it.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Building without prebuilt directory
WOW, great work! Now you can install the last Livecode 6.5 on raspberry PI, just download from:
http://downloads.livecode.com/livecode/pi/
It works on my raspberry Pi and builds also correct standalone for rapsberry PI!!!!
http://downloads.livecode.com/livecode/pi/
It works on my raspberry Pi and builds also correct standalone for rapsberry PI!!!!
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w