Results 1 to 3 of 3

Thread: Can't get my program to use my modified glib

  1. #1
    Join Date
    Jan 2008
    Beans
    100

    Can't get my program to use my modified glib

    I made a small change to the glib source code (GFileInfo.c to be more precise), ran ./configure (with a new prefix), make and make install.

    Then I changed /usr/lib/x86_64-linux-gnu/pkgconfig/gio-2.0.pc file so that the prefix is my working directory and that everything goes to the right path. Writing "pkg-config --cflags --libs gio-2.0" in the terminal seems to give a good output.

    Then I made a small haxx.c file that took use of this new glib. I compiled it with
    Code:
    gcc haxx.c $(pkg-config --cflags --libs gio-2.0)
    But when I run "ldd a.out", it only shows me the old paths. What am I doing wrong?

    Thanks!

  2. #2
    Join Date
    Jan 2008
    Beans
    100

    Re: Can't get my program to use my modified glib

    Anyone?

  3. #3
    Join Date
    Feb 2013
    Beans
    Hidden!

    Re: Can't get my program to use my modified glib

    Wouldn't rebuilding the deb source with your changes be easier than compiling glib from scratch? What version of glib do you need? Currently, it's 2.32.3 in precise and 2.34.1 in quantal.

    Code:
    sudo apt-get install devscripts quilt
    sudo apt-get build-dep glib2.0
    apt-get source glib2.0
    cd glib2.0*
    cat <<EOF >~/.quiltrc-dpkg
    d=. ; while [ ! -d $d/debian -a `readlink -e $d` != / ]; do d=$d/..; done
    if [ -d $d/debian ] && [ -z $QUILT_PATCHES ]; then
    QUILT_PATCHES="debian/patches"
    QUILT_PATCH_OPTS="--reject-format=unified"
    QUILT_DIFF_ARGS="-p ab --no-timestamps --no-index --color=auto"
    QUILT_REFRESH_ARGS="-p ab --no-timestamps --no-index"
    QUILT_COLORS="diff_hdr=1;32:diff_add=1;34:diff_rem=1;31:diff_hunk=1;33:diff_ctx=35:diff_cctx=33"
    [ -d $d/debian/patches ] || mkdir $d/debian/patches
    fi
    EOF
    export DEBFULLNAME="Jey Peyy"
    export DEBEMAIL=jey.peyy@example.com
    alias dquilt="quilt --quiltrc=${HOME}/.quiltrc-dpkg"
    dquilt new jp-fix-to-gfileinfo.patch
    dquilt add gio/gfileinfo.c
    editor gio/gfileinfo.c
    # make your changes to gfileinfo.c
    dquilt refresh
    dquilt header -e
    # describe your patch
    sudo dch -l~jey
    # describe your changes
    debuild -i -us -uc -b
    # wait for build process to end
    sudo debi
    Lines marked green can be added to your ~/.bashrc. Lines marked red must be done only once: the quilt setup will work for all your future deb packages.
    Last edited by schragge; April 26th, 2013 at 09:44 AM.

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
  •