WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: SCM buildin how-to  (Read 14330 times)

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: SCM buildin how-to
« Reply #15 on: April 14, 2012, 07:41:24 AM »
The source of your sc.inc-are simply recompressed in the xz format or you've made ​​some changes?

P.s. You apply changes only as patches? (then I should become aware by reading -sc.inc)
« Last Edit: April 14, 2012, 08:14:43 AM by vinnie »

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: SCM buildin how-to
« Reply #16 on: April 14, 2012, 08:23:25 AM »
I try to recompress using xz to save space on the server.

Patches that are used are patches that other distros use, mainly Arch, and I use them if I feel they are applicable to what the app needs for us.  Some patches are for things like fixing man pages, so I don't use those, but others are needed for the app to build, like a fix to use with our version of gcc.

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: SCM buildin how-to
« Reply #17 on: April 14, 2012, 04:52:07 PM »
hey jason, I am close but I have several problems; meanwhile, I attaching my script (I used your libvorbis with libogg & sdl_mixer with sdl and libmikmod).

I used two patches with gargoyles, the first removes the dependence smpeg, this is because I can not compile it (you can try looking smpeg-sc.inc)
Code: [Select]
Index: Jamrules
===================================================================
--- Jamrules (revision 590)
+++ Jamrules (working copy)
@@ -111,7 +111,7 @@
         if $(USESDL) = yes
         {
             GARGLKCCFLAGS += -I/usr/include/SDL ;
-            GARGLKLIBS += -lSDL_mixer -lSDL_sound -lSDL -lsmpeg -lvorbisfile ;
+            GARGLKLIBS += -lSDL_mixer -lSDL_sound -lSDL -lvorbisfile ;
         }
 
         if $(STATIC) { LINKLIBS += $(GARGLKLIBS) ; }

And the second patch serves to replace the prefix (this forces the use of a specified directory: ./buildscm gargoyle-sc.inc /apps/gargoyle):
Code: [Select]
Index: Jamfile
===================================================================
--- Jamfile (revision 590)
+++ Jamfile (working copy)
@@ -13,9 +13,9 @@
 # If SYSTEM is set, use values for a system wide install
 if $(SYSTEM)
 {
-    BINDIR = /usr/local/libexec/gargoyle ;
-    APPDIR = /usr/local/libexec/gargoyle ;
-    LIBDIR = /usr/local/lib/gargoyle ;
+    BINDIR = /apps/gargoyle/bin ;
+    APPDIR = /apps/gargoyle/bin ;
+    LIBDIR = /apps/gargoyle/lib ;
     DESTDIR = / ;
     EXEMODE = 755 ;
     FILEMODE = 755 ;


By compiling in the normal way it's all right (although the dependence smpg.tcz does his job), but when I use the method "scm" with the script (and thinks with relative export), compilation should not be.
Good normal compilation
Bad scm compilation


After a diff I think I've located the problem: gargoyle can not find the library LIBJPEG_6.2 of gtk, for example (just in the end of bad file):
Code: [Select]
build/linux.release/garglk/libgarglk.so: undefined reference to `jpeg_std_error@LIBJPEG_6.2'
build/linux.release/garglk/libgarglk.so: undefined reference to `jpeg_finish_decompress@LIBJPEG_6.2'
build/linux.release/garglk/libgarglk.so: undefined reference to `jpeg_stdio_src@LIBJPEG_6.2'
build/linux.release/garglk/libgarglk.so: undefined reference to `jpeg_read_scanlines@LIBJPEG_6.2'
build/linux.release/garglk/libgarglk.so: undefined reference to `jpeg_CreateDecompress@LIBJPEG_6.2'
build/linux.release/garglk/libgarglk.so: undefined reference to `jpeg_start_decompress@LIBJPEG_6.2'
build/linux.release/garglk/libgarglk.so: undefined reference to `jpeg_destroy_decompress@LIBJPEG_6.2'
build/linux.release/garglk/libgarglk.so: undefined reference to `jpeg_read_header@LIBJPEG_6.2'
collect2: ld returned 1 exit status

I assure you that I downloaded gtk2-dev.tar.xz and extracted in /apps/ .

In PKBUILD of aur they using another technique to move gargoyle's file instead of the using patch (and then edit the jamfile):
Code: [Select]
jam ||return 1
jam install || return 1
...
install $srcdir/build/dist/* $pkgdir/usr/share/gargoyle/
ln -s /usr/share/gargoyle/gargoyle $pkgdir/usr/bin/gargoyle
install $srcdir/build/dist/libgarglk.so $pkgdir/usr/lib/

if I did not use the export in gargoyle-sc.inc and then move the files by hand as in PKBUILD, the wrapper would suffice to solve the situation?

« Last Edit: April 14, 2012, 04:56:52 PM by vinnie »

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: SCM buildin how-to
« Reply #18 on: April 14, 2012, 05:29:40 PM »
Thanks, I will give it a try tonight.

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: SCM buildin how-to
« Reply #19 on: April 14, 2012, 07:26:47 PM »
some good news, gargoyle.scm works (almost).

in gargoyle-sc.inc I commented all the lines of export and then build.
After building (gone well) i make wrapping and I used this script to replace gargoyle:
Code: [Select]
#!/bin/sh

export LD_LIBRARY_PATH=/apps/gargoyle/lib:/apps/gtk2/lib
export PATH=/apps/gargoyle/localbin:/apps/gtk2/bin:$PATH

/apps/gargoyle/localbin/gargoyle "$@"


After i try to install (in a core enviorment with only Xvesa, fltk and fluxbox) it work but only after I have installed libiconv and smpeg (I installed smpeg excluding its dep file, to make sure it was using the gtk2.scm library).
I do not know why it asks me smpeg again (I do not remember having commented the string of the patch that disables it), but I would ask you a hand to build this library (I also tried fo find the build-dep in the 3.x repository, but it is not there).

for libiconv I immediately start to work

Thanks to you, this is very instructive for me

P.s. ok libiconv seems to work, smpeg is the only malevolent creation  :P

P.p.s i forget, if you try, the dependency ftjam.tcz of gargoyle is in email of tcsubmit!
« Last Edit: April 14, 2012, 09:03:29 PM by vinnie »

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: SCM buildin how-to
« Reply #20 on: April 14, 2012, 09:34:57 PM »
Ok, I am attempting to build it now.  I will see what I can find.



Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: SCM buildin how-to
« Reply #21 on: April 14, 2012, 11:23:19 PM »
The jam command extension is not found, time is tight tonight so I can't go further.

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: SCM buildin how-to
« Reply #22 on: April 14, 2012, 11:26:05 PM »
The jam command extension is not found, time is tight tonight so I can't go further.
Yep, i send ftjam to tcsubmit mail!


For now I'm Fried, I did other build tests in my other poor of dependencies environment version.
This time does not seem to work, I think the last time it took the majority of building dependencies by the system (I commented the lines of exports in gargoyle-sc.inc), and at the end with the wrapping the package scm worked.

The only things I have noticed more in this round are that sdl-sc.inc need to have SDL installed in the system otherwise it will not compile:
Code: [Select]
...
checking for SDL - version >= 1.2.0... no
*** Could not run SDL test program, checking why...
*** The test program compiled, but did not run. This usually means
*** that the run-time linker is not finding SDL or finding the wrong
*** version of SDL. If it is not finding SDL, you'll need to set your
*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point
*** to the installed location  Also, make sure you have run ldconfig if that
*** is required on your system
***
*** If you have an old version installed, it is best to remove it, although
*** you may also be able to get things to work by modifying LD_LIBRARY_PATH
configure: error: *** SDL version 1.2.0 not found!
tc@box:~/Garg$

and also smpeg is required by gargoyle in any case, patch or no patch

Thank jason, now i go to bed, and I hope to recover my strength for the next round!
« Last Edit: April 14, 2012, 11:28:46 PM by vinnie »

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: SCM buildin how-to
« Reply #23 on: April 15, 2012, 12:03:55 AM »
Ok, I will try again when ftjam is uploaded.


Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: SCM buildin how-to
« Reply #24 on: April 18, 2012, 06:49:15 PM »
Sorry for the delay, I have not had any opportunity to revisit this, I will  give it a shot when I can.

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: SCM buildin how-to
« Reply #25 on: April 19, 2012, 06:53:51 AM »
do not worry, this week I have not much time to dedicate it, probably in the next I'll be more free.
However, I have the feeling that it is enough to figure out how to compile smpeg.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: SCM buildin how-to
« Reply #26 on: April 19, 2012, 01:08:07 PM »
smpeg needs libgl, at least the stable version does.  I was not able to look further last night, but maybe I can build it tonight, Arch Linux has libgl as an optional dep.

Offline solorin

  • Full Member
  • ***
  • Posts: 184
Re: SCM buildin how-to
« Reply #27 on: April 29, 2012, 11:47:52 AM »
Will there be a concise guide for building and submitting scm's as there is for tcz's written up on the wiki?

Interested in buildng and submitting some audio scm's.

cheerio,
solorin
« Last Edit: May 05, 2012, 11:24:27 AM by solorin »
. . . if you don't know, now you know. . .
        ----- R.I.P. Biggie Smalls -----

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: SCM buildin how-to
« Reply #28 on: May 05, 2012, 08:28:23 AM »
I am sure there will be in time, and it would be good for someone who has the interest and opportunity to piece together the snippets found here in the threads and make a general guide.  I will try to make a post containing all the details so far and sticky it so it does not get buried.