View Poll Results: Have you found this information useful

Voters
114. You may not vote on this poll
  • Yes, Very insightful

    66 57.89%
  • No, Confussing as hell

    48 42.11%
Page 4 of 4 FirstFirst ... 234
Results 31 to 39 of 39

Thread: HOWTO: Compile source code

  1. #31
    Join Date
    Aug 2009
    Beans
    4

    Smile Re: HOWTO: Compile source code

    Quote Originally Posted by pay View Post
    Howto Compile Source Code on Ubuntu

    One thing that I have noticed is a lot of new users to Ubuntu have trouble when it comes to compilling source code. Hopefully, after this guide you will see it as the rather simple task that it really is. First thing, make sure that you have the basic compillers, otherwise you won't be able to compile anything. Open up the terminal and type in
    Code:
    sudo aptitude install build-essential
    A few other tools that can come in usefull are automake1.9, libtoolize, subversion, cvs and checkinstall.

    Now we are on to the fun stuff I'll use an example of compilling mplayer (gui) with x264, xvid and ffmpeg support. There are a few ways to download the source and compile it so I will show multiple ways to do each section.

    Part 1 – Compilling XviD
    Firstly, download the source code. There are a few ways to do this.

    1) Using apt
    Code:
    apt-get source xvid
    2)Browsing the website and extracting it
    Code:
    wget http://downloads.xvid.org/downloads/xvidcore-1.1.2.tar.bz2
    tar jxvf xvidcore-1.1.2.tar.bz2
    (note: for a tar.gz archive use tar zxvf <archive>)

    3) Using developer cvs/svn repositories
    Code:
    cvs -d:pserver:anonymous@cvs.xvid.org:/xvid login    #(just type enter)
     cvs -d:pserver:anonymous@cvs.xvid.org:/xvid co xvidcore
    Now make sure that you have all the dependencies needed to compile the code.
    Code:
    sudo apt-get build-dep xvid
    will download everything you need (Make sure that you have the deb-src repo enabled). If you get errors while configureing about a missing library or package, install that package

    Secondly, configure the source code. For cvs it is slightly different (for xvid anyway, normally the readme will give clues). For cvs only run
    Code:
    ./bootstrap.sh
    before ./configure. Now change the directory to where you have extracted the source code to
    Code:
    cd ${xvidcore}/build/generic
    Now the hard part. Picking what options you want to compile the source code with. My recommened way is
    Code:
    ./configure CFLAGS="-march=athlon64 -O2 -pipe -mtune=athlon64” CHOST="x86_64-pc-linux-gnu"  MAKEOPTS="-j2" –prefix=/usr
    This ./configure command will result in optimised code, which should be faster but may make debugging almost impossible. Don't open a new bug report unless if you compile it generically (ie ./configure –prefix=/usr). Here's a list of CFLAGS recommened for different processors. http://gentoo-wiki.com/Safe_Cflags
    For more information on CFLAGS look here http://gcc.gnu.org/onlinedocs/gcc-3....e-Options.html

    Now Compile the source with make
    Code:
    make
    Once that finishes without any errors you will have the program compilled in that directory. You can use it to make sure that it works as expected before installing it. There are a few ways to intall the software. A simple
    Code:
    sudo make install
    will install it as is. Using checkinstall you can make a debian file with
    Code:
    sudo checkinstall -D make install
    sudo dpkg -i <package>.deb
    Also you can make a more generic debian file with
    Code:
    sudo dpkg-buildpackage
    However, it will just compile a generic package without optimisations. Also
    Code:
    sudo apt-get –build source
    will make a generic debian package of the source code. Hopefully there is someone that has found this information useful. Recommendations and constructive cristisms are encouraged.

    TO BE CONTINUED with x264, ffmpeg with enabling features (xvid and x264 support) and mplayer with a gui and codec support.
    Epic How To little bit confusing tho

  2. #32
    Join Date
    May 2010
    Beans
    3

    Re: HOWTO: Compile source code

    My hat off to the people that take the time to try and assist the world - such as the author of this How-To, thank you!
    As to the people that feel compelled to write negative, non-constructive comments - here are some thoughts for you.

    • It takes you about a minute to jot down your negative, snide little remark.
    • It takes a How-To author hundreds of minutes to write a decent How-To that isn't filled with errors.
    • How-To authors invariably get slammed for their work by other people (such as you) that could "obviously" do a much better job - but don't.
    • The bottom line is this - if you have nothing constructive to say then say nothing.


    To Pay, I realize you are unlikely to ever see this post but thank you for your effort. Keep up the good work and how about an update?

  3. #33
    Join Date
    Aug 2010
    Beans
    3
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HOWTO: Compile source code

    When i type in one of the commands then it gives me no output of what happende and just went back to
    Code:
    andee@andee-laptop:~/client$
    in terminal.

    Any advise on what is wrong?

  4. #34
    Join Date
    Mar 2010
    Beans
    3

    Re: HOWTO: Compile source code

    Probably not a great idea to keep this thread going on for so long but I decided to post anyway in the event it may help someone eventually who stumbled on it from Google (like I did).

    Thought the article was good, really enjoyed reading it. Maybe you could edit it and explain the parameters you used in configure but other than that, pretty helpful!

    I'm surprised no one has mentioned this but anyone new to this should read the Ubuntu article:
    https://help.ubuntu.com/community/CompilingEasyHowTo

    Really informative and easy to read and afterwards you'll understand this how-to much better.

    @ skarychinezeguie:

    Open terminal.
    Use "cd" to change directory to where you've extracted your source files (extract the file by right-clicking on it and selecting Extract here). Say it's in the Home folder. For me, it would be: cd /home/rob/foo/, where "foo" is the name of the folder that the source files are in. It's important that folder hierarchy is preserved so that commands used point to the right locations. From there, run the three commands mentioned. That's the basic three steps you asked for. But read the link I gave because there's more to it than that, and you need to have a lot of other things installed for this to work.

    Just a bit of advice to save someone from any needless searching.

  5. #35
    Join Date
    Dec 2009
    Beans
    9

    Re: HOWTO: Compile source code

    I've snipped my post to put it in a newer topic later. PLEASE DELETE
    Last edited by lokino; July 16th, 2011 at 01:13 AM. Reason: Posted in an OLD topic thread, will be re-posted elsewhere.

  6. #36
    Join Date
    Jun 2012
    Beans
    1

    Smile Re: HOWTO: Compile source code

    2011_0719_rt3070_V2.5.0.3_DPO.b2z
    was downloaded from ralink to install a wifi adapter into linux and these were the drivers.. after the read me, the makefile.. f**k Trying to compile source code in .b2z files!! were is our "automatic compiling of .b2z folders" [installer software application] automation that will turn them into .deb?!? i dont understand terminal luanguage?!? The .EXE was there to make it EASY!! [[automatic compiling of .b2z folders, will become an automation Software building application]] any sorce .b2z that you get, should automatically be compiled with this new Compiling Software... What the F**K?!? *Face, Palm..

    Automatic .b2z compiling and installing application...
    does this Exist?


    Q: a computer does what?
    A: it makes the advanced sh*t simple..
    ..The EXE, hmm wonder why windows is the most chosen.

  7. #37
    Join Date
    Jul 2013
    Location
    BC, Canada
    Beans
    28
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: HOWTO: Compile source code

    Arggh I need to compile Wine source code. Anyone know how to do this?

  8. #38
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    5,141
    Distro
    Ubuntu

    Re: HOWTO: Compile source code

    Quote Originally Posted by steamer360 View Post
    Arggh I need to compile Wine source code. Anyone know how to do this?
    http://www.winehq.org/docs/wineusr-g...ng-wine-source
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

  9. #39
    Join Date
    Jul 2007
    Location
    Magic City of the Plains
    Beans
    Hidden!
    Distro
    Kubuntu Development Release

Page 4 of 4 FirstFirst ... 234

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •