PCSAWICK829
Posts: 7
Joined: Sun Jan 05, 2014 9:44 pm

Trying to install Scratch from it's source code

Sun Apr 27, 2014 12:32 am

Right off the bat, I apologize if I posted in the wrong area for this question.

I have my Raspberry Pi running fine and it has Scratch installed. I mainly got the Pi to learn Linux and take a stab at programming. One of the first things I'm doing is attempting to work with the Shell and get comfortable with it. I have been starting some tutorials out of books with Scratch. However, life is pretty busy for me, so I find myself having to make errands and I usually end up sitting in the car for a good deal of time. I bring my laptop, which has Linux Mint installed. When I can't use my Pi for Scratch, I'd like to use my laptop for some of the same programs. I could easily 'cheat' and install Scratch on it through the package manager or through the GUI, yes, but I am trying to tackle installing software manually. I'm understanding the first part of the process, which is to uncompress the tar.gz file and extract the files. That's easy enough.

The next step is where I'm confused. The tutorial I'm using directs me to use './configure', but I see no configuration script, or I just dont recognize it from the files given to me by the Scratch source code file. I'm hoping someone has had experience with this or knows of a link to a tutorial. I've been googling for the past hour, looking for links, videos, even images, but nothing is showing me what I need.

I realize this is being done in linux mint's shell, but I can't imagine the process is drastically different from Raspbian's shell. My whole goal is to learn how to compile software within linux's shell at the moment. I figured it being Scratch would make this the perfect place to ask. I greatly appreciate any answers or help.

Tarcas
Posts: 741
Joined: Thu Jan 09, 2014 5:38 am
Location: USA

Re: Trying to install Scratch from it's source code

Sun Apr 27, 2014 5:20 am

If you're not finding it, I'm guessing the issue is that file names that start with . are the DOS equivalent of hidden files. They don't show up when you do "ls." You need to run "ls -a" to show all files, including the hidden ones. Even if you haven't seen it in a listing, you can still use it like any file, however the . must be used as part of the filename, so if it is executable, you would run "./.configure" from the directory in which it resides. If it is a text file, "nano .configure" would open it.

PCSAWICK829
Posts: 7
Joined: Sun Jan 05, 2014 9:44 pm

Re: Trying to install Scratch from it's source code

Sun Apr 27, 2014 9:46 pm

I tried to reveal hidden files, but that doesn't seem to produce anything that shows as a configure file. I took a screen shot to show (sorry, i did the best screen shot i could) and asking the shell to list all hidden files. Just to make double sure I wasn't missing anything in the sub-directories, I used my GUI to search through each of them with all hidden files shown and nothing. I'm still new to linux and shell.. is it possible though there is no configure file in this instance?
Attachments
Screenshot2.png
Screenshot2.png (20.02 KiB) Viewed 1766 times

Tarcas
Posts: 741
Joined: Thu Jan 09, 2014 5:38 am
Location: USA

Re: Trying to install Scratch from it's source code

Sun Apr 27, 2014 10:33 pm

I haven't compiled Scratch, but if it's anything like compiling a kernel, the .config file is created after running make menuconfig or make config. These commands run scripts that allow you to set the configurations, and those are then saved. First I'd look through the README if you haven't, and if that doesn't say how to configure it, take a look at the Makefile. It's basically a script that tells make what to do, including how to handle parameters such as "make menuconfig" or "make clean" or the default, just "make" If it has sections in there for something that looks like configure, config, menuconfig, or whatever, try running it with the name of that section as a parameter.

Do you have a link to the instructions that you're following that told you to use .configure? Maybe if I saw it in context I could make a little more sense out of it.

PCSAWICK829
Posts: 7
Joined: Sun Jan 05, 2014 9:44 pm

Re: Trying to install Scratch from it's source code

Wed Apr 30, 2014 5:59 pm

Thanks for your continued help :D So I simply typed 'make' while in the directory and things started happening.. but then i received this message: (screen shot for more info)
-------------------------------------------------------------------------------------------------------------
gcc -fPIC -c `pkg-config --cflags pangocairo` *.c
Package pangocairo was not found in the pkg-config search path.
Perhaps you should add the directory containing `pangocairo.pc'
to the PKG_CONFIG_PATH environment variable
No package 'pangocairo' found
UnicodeOps-linux.c:28:30: fatal error: pango/pangocairo.h: No such file or directory
#include <pango/pangocairo.h>
^
compilation terminated.
make[1]: *** [build] Error 1
-----------------------------------------------------------------------------------
Based on the README file that came with the source code and this message in the shell, I think I need some lib files?

"Since Scratch runs as an image on a Squeak virtual machine, all that needs to be compiled when packaging Scratch are the necessary plugins, which can be done using the included makefile. The following libraries are necessary to build the plugins:
libcairo2-dev (>= 1.8.6), libpango1.0-dev (>= 1.20.5), libglib2.0-dev (>= 2.20.1)"

My instincts are telling me that's what i'm missing and i need to figure out how to get those lib files now.
Attachments
makeResult.png
makeResult.png (35.92 KiB) Viewed 1624 times

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: Trying to install Scratch from it's source code

Wed Apr 30, 2014 7:37 pm

Don't think this should be in RPi beginners :)

More like "Advanced Other Computers"

Really should be in another forum :)

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

Tarcas
Posts: 741
Joined: Thu Jan 09, 2014 5:38 am
Location: USA

Re: Trying to install Scratch from its source code

Wed Apr 30, 2014 10:25 pm

Well, this page tells where pangocairo comes from:
http://lists.cairographics.org/archives ... 08202.html

Simplesi is right. Can this be moved to Advanced, or maybe Scratch?

PCSAWICK829
Posts: 7
Joined: Sun Jan 05, 2014 9:44 pm

Re: Trying to install Scratch from it's source code

Fri May 09, 2014 2:58 am

I can post this to the Advanced forum. That is no problem. How do I do this? Simply copy/paste everything over or is there a setting? Also, just to note, I'm new to Linux, so after a few basics, I'm not sure what would constitute advanced, intermediate, or beginner as everything is new to me, so I apologize. Thanks again for the help and let me know how best to take this to another forum.

ghans
Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Trying to install Scratch from it's source code

Fri May 09, 2014 6:15 am

To get those development files , use apt-get :

Code: Select all

sudo apt-get install libname-dev
So far i know only moderators can move threads . PM one if you
want to have this thread moved.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

PCSAWICK829
Posts: 7
Joined: Sun Jan 05, 2014 9:44 pm

Re: Trying to install Scratch from it's source code

Fri May 09, 2014 11:52 pm

I'll try ghans solution first and if it works, I'll close this posting. If not, I'll get a hold of an admin and have this moved. Thank you :D

PCSAWICK829
Posts: 7
Joined: Sun Jan 05, 2014 9:44 pm

Re: Trying to install Scratch from it's source code

Sun May 18, 2014 9:47 pm

ghans, that command helped me get the lib files i needed! thank you. it didn't help the installation manually from the shell through the source file though. so i just gave up on it and used the apt-get through the shell to install it, which it worked fine. Maybe later when i'm further along with linux, i can have a go at it again. Thank you to all who helped me here. :)

PCSAWICK829
Posts: 7
Joined: Sun Jan 05, 2014 9:44 pm

Re: Trying to install Scratch from it's source code

Sun May 18, 2014 9:56 pm

i tried searching, but didnt see anything. is there a way to close this post or do i need to or.. .? thanks again.

Return to “Beginners”