Guide to setting up a visual GNOME build environment for the 'side4linux' IDE Let us set up an UBUNTU GNOME build environment from scratch using the Synaptic Package Manager (users of rpm based systems such as SUSE will probably install from distribution CD or use rpmfind on the Internet). We will need to check our terminal output against the rest of this help file!! We will presume that this is a new installation of UBUNTU and that the exercises in 'setup C build environment.txt' have resulted in the success full installation of a working 'C' language compiler?? (you did do this exercises didn't you?). SECURITY NOTE: Keep in mind that you should not be connected to the Internet while logged in as the super user 'root'!. PREREQUISITES-1: We presume that you have completed 'setup C build environment.txt' OUTCOMES: To test the GNOME build environment we will auto generate 'side4linux' from the command line in a terminal with the commands, 'sh autogen.sh --prefix=/opt/Side' 'make' 'make install' along with checking for the installation of the 'glade-3' visual interface builder with the command 'glade-3 --version' Change to the "SIDE/GNOMEC/side4linux$" directory, open a terminal and type dir *.* my results are as follows, rdb@server:~/Data/Projects/SIDE/GNOMEC/side4linux$ dir *.* aclocal.m4 config.h.in configure.in Makefile.am side4linux.glade side4linux.prj autogen.sh config.log debug.txt Makefile.in side4linux.glade.bak side4linux.prjbak config.guess config.status install-files.sh output.txt side4linux.gladep stamp-h.in config.h config.sub INSTALL.txt README-FIRST.txt side4linux.gladep.bak autom4te.cache: output.0 requests traces.0 Notice the file 'autogen.sh' click on the file and check it's Properties, it must be set to execute. Now try to autogenerate 'side4linux' using the GNOME autogen shell file, my results are as follows, rdb@server:~/Data/Projects/SIDE/GNOMEC/side4linux$ sh autogen.sh --prefix=/opt/Side **Error**: You must have `autoconf' installed. Download the appropriate package for your distribution, or get the source tarball at ftp://ftp.gnu.org/pub/gnu/ **Error**: You must have `automake' installed. You can get it from: ftp://ftp.gnu.org/pub/gnu/ Not a good start! We have not got a GNOME build system yet! Search for 'autoconf' using the Synaptic Package Manager and install the files, 'autoconf 2.599a-3' or greater 'm4' Search for 'automake' using the Synaptic Package Manager and install the files, 'automake1.9' or greater 'autotools-dev' Having installed 'autoconf' and 'automake' let us try GNOME auto generation again, my results are as follows, rdb@server:~/Data/Projects/SIDE/GNOMEC/side4linux$ sh autogen.sh --prefix=/opt/Side ======== Start of Listing ======= = =**Warning**: I am going to run `configure' with no arguments. =If you wish to pass any to it, please specify them on the =`autogen.sh' command line. = = =processing . =Running aclocal ... =Running autoheader... =Running automake --gnu ... =configure.in: installing `./install-sh' =configure.in: installing `./missing' =src/Makefile.am: installing `./depcomp' =Makefile.am: installing `./INSTALL' =Makefile.am: installing `./COPYING' =Running autoconf ... =Running ./configure --enable-maintainer-mode ... =checking for a BSD-compatible install... /usr/bin/install -c =checking whether build environment is sane... yes =checking for gawk... no =checking for mawk... mawk =checking whether make sets $(MAKE)... yes =checking whether to enable maintainer-specific portions of Makefiles... yes =checking for style of include used by make... GNU =checking for gcc... gcc =checking for C compiler default output file name... a.out =checking whether the C compiler works... yes =checking whether we are cross compiling... no =checking for suffix of executables... =checking for suffix of object files... o =checking whether we are using the GNU C compiler... yes =checking whether gcc accepts -g... yes =checking for gcc option to accept ANSI C... none needed =checking dependency style of gcc... gcc3 =checking for library containing strerror... none required =checking for gcc... (cached) gcc =checking whether we are using the GNU C compiler... (cached) yes =checking whether gcc accepts -g... (cached) yes =checking for gcc option to accept ANSI C... (cached) none needed =checking dependency style of gcc... (cached) gcc3 =checking for gcc... (cached) gcc =checking whether we are using the GNU C compiler... (cached) yes =checking whether gcc accepts -g... (cached) yes =checking for gcc option to accept ANSI C... (cached) none needed =checking dependency style of gcc... (cached) gcc3 =checking how to run the C preprocessor... gcc -E =checking for egrep... grep -E =checking for ANSI C header files... yes =checking for pkg-config... /usr/bin/pkg-config =checking pkg-config is at least version 0.9.0... yes =checking for PACKAGE... configure: error: Package requirements (libgnomeui-2.0) were not met. =Consider adjusting the PKG_CONFIG_PATH environment variable if you =installed software in a non-standard prefix. = =Alternatively you may set the PACKAGE_CFLAGS and PACKAGE_LIBS environment variables =to avoid the need to call pkg-config. See the pkg-config man page for =more details. =rdb@server:~/Data/Projects/SIDE/GNOMEC/side4linux$ = ======== End of Listing ======= Notice the error 8 lines from the end of the listing, 'checking for PACKAGE... configure: error: Package requirements (libgnomeui-2.0) were not met' this means that one or more needed dynamically linked libraries required to build 'side4linux' is missing, in this case 'libgnomeui-2.0' and remember that we are after the development, not the runtime libraries. Just to let you know what a good job it is to have a package manager I thought you would like to see what 'libgnomeui' library dependencies are as follows using the 'dpkg' single file installer, root@server:/media/cdrom0# dpkg --install libgnomeui-dev_2.12.0-0ubuntu1_i386.deb ======== Start of Listing ======= = =Selecting previously deselected package libgnomeui-dev. =(Reading database ... 58671 files and directories currently installed.) =Unpacking libgnomeui-dev (from libgnomeui-dev_2.12.0-0ubuntu1_i386.deb) ... =dpkg: dependency problems prevent configuration of libgnomeui-dev: = libgnomeui-dev depends on libgnome2-dev (>= 2.6.0); however: = Package libgnome2-dev is not installed. = libgnomeui-dev depends on libgtk2.0-dev (>= 2.4.1); however: = Package libgtk2.0-dev is not installed. = libgnomeui-dev depends on libart-2.0-dev; however: = Package libart-2.0-dev is not installed. = libgnomeui-dev depends on libgnomecanvas2-dev (>= 2.6.0); however: = Package libgnomecanvas2-dev is not installed. = libgnomeui-dev depends on libgnome-keyring-dev (>= 0.0.2-2); however: = Package libgnome-keyring-dev is not installed. = libgnomeui-dev depends on libgconf2-dev (>= 2.6.0); however: = Package libgconf2-dev is not installed. = libgnomeui-dev depends on libbonoboui2-dev (>= 2.8.1-2); however: = Package libbonoboui2-dev is not installed. = libgnomeui-dev depends on libgnomevfs2-dev (>= 2.8.4-2); however: = Package libgnomevfs2-dev is not installed. = libgnomeui-dev depends on libjpeg62-dev | libjpeg-dev; however: = Package libjpeg62-dev is not installed. = Package libjpeg-dev is not installed. = libgnomeui-dev depends on libsm-dev | xlibs-dev; however: = Package libsm-dev is not installed. = Package xlibs-dev is not installed. = libgnomeui-dev depends on libice-dev | xlibs-dev; however: = Package libice-dev is not installed. = Package xlibs-dev is not installed. =dpkg: error processing libgnomeui-dev (--install): = dependency problems - leaving unconfigured =Errors were encountered while processing: = libgnomeui-dev = ======== End of Listing ======= So now we humbly search for 'libgnomeui' using the Synaptic Package Manager. We are looking for the 'libgnomeui-dev' package which will cause the installation of around fifty other packages if they are not already installed. Now let us run the autogeneration script again as follows, rdb@server:~/Data/Projects/SIDE/GNOMEC/side4linux$ sh autogen.sh --prefix=/opt/Side and the last few lines of running the autogeneration script 'autogen.sh' brings the following result, ======== Start of Listing ======= = =checking for ANSI C header files... yes =checking for pkg-config... /usr/bin/pkg-config =checking pkg-config is at least version 0.9.0... yes =checking for PACKAGE... yes =configure: creating ./config.status =config.status: creating Makefile =config.status: creating src/Makefile =config.status: creating config.h =config.status: config.h is unchanged =config.status: executing depfiles commands =Now type `make' to compile. = ======== End of Listing ======= It says to type in 'make' which should bring us the following, (I have snipped off the last compiled file, 'callbacks.c' from the end of the 'make' listing of 'side4linux' along with the linking commands employed. Note that all of the 'O' files [object files] which will make up the completed program 'side4linux' are also being linked in along with external support libraries. Now this may seem scary but the generation of the autogeneration script, configure and make files is mostly the job of 'side4linux'. This is also the case for other project types such as command line 'C' or AVR assembler or ANCA style G-code projects etc., etc.. rdb@server:~/Data/Projects/SIDE/GNOMEC/side4linux$ make ======== Snippet of 'make' of Listing ======= = =if gcc -DHAVE_CONFIG_H -I. -I. -I.. -DPACKAGE_DATA_DIR=\""/usr/local/share"\" =-DPACKAGE_LOCALE_DIR=\""/usr/local//locale"\" -DORBIT2=1 -pthread =-I/usr/include/libgnomeui-2.0 -I/usr/include/libgnome-2.0 =-I/usr/include/libgnomecanvas-2.0 -I/usr/include/gtk-2.0 =-I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/libbonoboui-2.0 =-I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include =-I/usr/include/gnome-keyring-1 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include =-I/usr/include/orbit-2.0 -I/usr/include/libbonobo-2.0 =-I/usr/include/bonobo-activation-2.0 -I/usr/include/pango-1.0 =-I/usr/include/freetype2 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 =-I/usr/include/cairo -I/usr/include/libxml2 =-Wall -g -g -O2 -MT callbacks.o -MD -MP -MF ".deps/callbacks.Tpo" =-c -o callbacks.o callbacks.c; \ =then mv -f ".deps/callbacks.Tpo" ".deps/callbacks.Po"; =else rm -f ".deps/callbacks.Tpo"; exit 1; fi =gcc -Wall -g -g -O2 -o side4linux main.o support.o interface.o Globals.o Error.o =StringDB.o DebugFile.o HighlightAVRA.o HighlightANCA.o HighlightC.o MiscWindow.o =TextFiles.o NewCLCprojectAutogen.o NewAVRAprojectAutogen.o NewANCAprojectAutogen.o =NewGNOMECprojectAutogen.o ProjectFiles.o BuildProject.o BoltCircle.o =callbacks.o -Wl,--export-dynamic -pthread -lgnomeui-2 -lSM -lICE -lbonoboui-2 =-lgnome-keyring -lxml2 -lz -lgnomecanvas-2 -lgnome-2 -lpopt -lart_lgpl_2 =-lpangoft2-1.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 =-lpangocairo-1.0 -lfontconfig -lXinerama -lXi -lXrandr -lXext -lXcursor -lXfixes =-lpango-1.0 -lcairo -lXrender -lX11 -lgnomevfs-2 -lbonobo-2 -lgconf-2 -lgobject-2.0 =-lbonobo-activation -lORBit-2 -lm -lgmodule-2.0 -ldl -lgthread-2.0 -lglib-2.0 =make[2]: Leaving directory `/home/rdb/Data/Projects/SIDE/GNOMEC/side4linux/src' =make[2]: Entering directory `/home/rdb/Data/Projects/SIDE/GNOMEC/side4linux' =make[2]: Leaving directory `/home/rdb/Data/Projects/SIDE/GNOMEC/side4linux' =make[1]: Leaving directory `/home/rdb/Data/Projects/SIDE/GNOMEC/side4linux' =rdb@server:~/Data/Projects/SIDE/GNOMEC/side4linux$ = ======== End of Listing ======= Now as per the last exercise in 'setup C build environment.txt' we switch to the superuser 'root' and run 'make install' rdb@server:~/Data/Projects/SIDE/GNOMEC/side4linux$ su Password: root@server:/home/rdb/Data/Projects/SIDE/GNOMEC/side4linux# make install ======== Start of Listing ======= = =Making install in src =make[1]: Entering directory `/home/rdb/Data/Projects/SIDE/GNOMEC/side4linux/src' =make[2]: Entering directory `/home/rdb/Data/Projects/SIDE/GNOMEC/side4linux/src' =test -z "/usr/local/bin" || mkdir -p -- "/usr/local/bin" = /usr/bin/install -c 'side4linux' '/usr/local/bin/side4linux' =make[2]: Nothing to be done for `install-data-am'. =make[2]: Leaving directory `/home/rdb/Data/Projects/SIDE/GNOMEC/side4linux/src' =make[1]: Leaving directory `/home/rdb/Data/Projects/SIDE/GNOMEC/side4linux/src' =make[1]: Entering directory `/home/rdb/Data/Projects/SIDE/GNOMEC/side4linux' =make[2]: Entering directory `/home/rdb/Data/Projects/SIDE/GNOMEC/side4linux' =make[2]: Nothing to be done for `install-exec-am'. =if test -d ./pixmaps; then \ = /home/rdb/Data/Projects/SIDE/GNOMEC/side4linux/install-sh -d /usr/local/share/pixmaps/side; \ = for pixmap in ./pixmaps/*; do \ = if test -f $pixmap; then \ = /usr/bin/install -c -m 644 $pixmap /usr/local/share/pixmaps/side; \ = fi \ = done \ =fi =make[2]: Leaving directory `/home/rdb/Data/Projects/SIDE/GNOMEC/side4linux' =make[1]: Leaving directory `/home/rdb/Data/Projects/SIDE/GNOMEC/side4linux' =root@server: = ======== End of Listing ======= Now type 'exit' in the terminal and check for the pressence of the 'glade-3' visual interface builder program. (remember now we are just after a program so back to binary executables only). my results are as follows, root@server:/home/rdb/Data/Projects/SIDE/GNOMEC/side4linux# exit rdb@server:~/Data/Projects/SIDE/GNOMEC/side4linux$ glade-3 --version ======== Start of Listing ======= = =bash: glade-3: command not found = ======== End of Listing ======= Right, another problem, no 'glade-3' !! Search for 'glade' using the Synaptic Package Manager. Mark for install the following and 'Apply', ( we want Glade-2 for older Projects if available ) glade-common-2 glade-gnome-2 glade-common-3 glade-gnome-3 We will now re-try our glade test as follows, rdb@server:~/Data/Projects/SIDE/GNOMEC/side4linux$ glade-2 --version ======== Start of Listing ======= = =Gnome glade-2 2.12.0 = ======== End of Listing ======= rdb@server:~/Data/Projects/SIDE/GNOMEC/side4linux$ glade-3 --version ======== Start of Listing ======= = =glade3 3.4.0 = ======== End of Listing ======= Now go to the top 'SIDE' directory, open a terminal there and chage to super user 'root' and run the 'Build.sh' install script which will re-compile side4linux and install all of the 'Help' files and 'Tools'. db@wks1:~/Data/Projects/SIDE$ su Password: root@wks1:/home/db/Data/Projects/SIDE# sh Build.sh etc... etc...... make[1]: Leaving directory `/home/db/Data/Projects/SIDE/TOOLS/SIDEtools/GNOMEC/side4linux' Copying ReservedWord files Copying help files Copying common help files Build side4linux completed! root@wks1:/home/db/Data/Projects/SIDE# exit exit db@wks1:~/Data/Projects/SIDE$ And finally you can try 'side4linux' in the terminal which should start your newly compiled copy of the IDE. From now on you will be spared any of the above as the IDE will do the work for you! db@wks1:~/Data/Projects/SIDE$ /opt/Side/bin/side4linux You could even put a 'launcher' on your desktop pointing to, /opt/Side/bin/side4linux M the 'M' qualifier is used to put side4linux into 'maximise window on start' mode. 'Launchers' can be made by right clicking on the desktop in a clear space and filling in the popup menue wizard presented when you click on 'Create launcher'. You can define the side4linux Desktop Icon as /opt/Side/Templates/side4linuxicon.xpm Remember to use the 'Build' script in the top SIDE directory of the side4linux package from now on to build side4linux as you move to each new version as it creates and installs more than just the IDE, things like tools, help etc. Do not forget to read 'Installation Instructions.txt' where you unpacked the TAR file as it contains important information for setting up the configure file 'sideproject.cfg' in your 'home' directory. Without this file being properly setup the IDE will loose it's way, become unstable and crash! Remember that every user also requires their own SIDE directory structure and their own 'sideproject.cfg' file added to their home directory suitably setup to point to their SIDE directory. This allows multiple invocations of 'side4linux' with separate project space for each user on the same machine. Some thought needs to be given to group work on a network but we can leave that for another day until the user base has increased and the various views on how to do this have been discussed. Welcome to the world of GNOME programming! The IDE 'side4linux' coupled with support programs such as the 'glade-3' visual interface builder will make life a lot easier from now on. Now click on 'Help' in the main menue of 'side4linux' for a guide to GNOME visual programming. DB. Adelaide, South Australia, 2008 Note: What would really make this file great is your feedback on it's suitability and accuracy, so if something is done wrong or is misleading then we must know as soon as possible!! To this end then you are encouraged to leave a message in the 'Help' forum on the 'side4linux' project page. Never think that someone else will do it or that you are not experienced enough to say something. It could be said that 'uber code cutters' will get by even without any documentation at all but the less experienced will benefit from your generous gift.