Results 1 to 2 of 2

Thread: gcc in makefile with pkg-config doesn't pickup PKG_CONFIG_PATH

  1. #1
    Join Date
    Aug 2010
    Beans
    6

    Question gcc in makefile with pkg-config doesn't pickup PKG_CONFIG_PATH

    Hello,

    I am trying to cross compile (for the TI dm365 ARM processor) a gstreamer program (not gstreamer itself, a program that uses it) on 10.04 using a make file.

    I am running on
    Ubuntu 10.04 with CodeSourcery toolchain for dm365 located in /opt/arm-2009q1 and included in $PATH.

    If I

    Code:
    export PKG_CONFIG_PATH /home/wmiller/workdir/filesys/opt/gstreamer/lib/pkgconfig


    (points to the ARM pkg-config files) and issue this make command

    Code:
     arm-none-linux-gnueabi-gcc `pkg-config --cflags --libs gstreamer-0.10` gst1.c -o gst1


    I get gst1 as a binary file. (Won't execute, but we'll talk about that next post).

    Now, if I put my make command into a makefile

    Code:
    gst1: gst1.c
        arm-none-linux-gnueabi-gcc `pkg-config --cflags --libs gstreamer-0.10`  gst1.c -o gst1


    and execute
    make, I get these errors.

    Code:
    arm-none-linux-gnueabi-gcc `pkg-config --cflags --libs gstreamer-0.10` \
        gst1.c -o gst1
    cc1: warning: include location "/usr/include/gstreamer-0.10" is unsafe for cross-compilation
    cc1: warning: include location "/usr/include/glib-2.0" is unsafe for cross-compilation
    cc1: warning: include location "/usr/include/libxml2" is unsafe for cross-compilation
    /opt/arm-2009q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lgstreamer-0.10
    collect2: ld returned 1 exit status
    make: *** [gst1] Error 1


    that indicate to me that the make command inside the makefile is completely ignoring the PKG_CONFIG_PATH environment variable. Yes, I've checked, It IS set in the environment before I execute make.

    Anyone know why it doesn't work inside the makefile? And, while we're at it, any ideas why, when it does work from the command line, why the resulting gst1 won't execute?

    Code:
    $ ./gst1
    bash: ./gst1: cannot execute binary file


    Any help will be greatly appreciated,

    Wes


  2. #2
    Join Date
    Aug 2010
    Beans
    6

    Re: gcc in makefile with pkg-config doesn't pickup PKG_CONFIG_PATH

    Well, I get the egg on the face award for my second question.

    Of course it won't run under Ubuntu. It's compiled for ARM-5.

    Duh.

    Wes

Tags for this Thread

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
  •