Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: xing.fan0302@googlemail.com (Xing Fan)
Subject: [ltt-dev] building ust for android/arm
Date: Wed, 20 Apr 2011 19:37:49 +0200	[thread overview]
Message-ID: <BANLkTinQ5WAPzwDD-iREO9bR5cLTQOGFtw@mail.gmail.com> (raw)

I am building lttng ust-0.6 for android/Arm platform.

However, I have problems to build libust.so. The error msg is:  make: *** No
rule to make target `build/core/libust-initializer.c', needed by
`out/target/product/u8500/obj/SHARED_LIBRARIES/libust_intermediates/libust-initializer.o'.
Stop.

It is very strange that the compiler tries to pick up libust-initializer.c
from build/core folder, even though I have specified that the source file is
in my LOCAL_PATH;

Anyone has clue how to write a Android.mk for this?

/Stella



My Android.mk file looks like this:
===========================================================
include $(call all-subdir-makefiles)

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE := libust
LOCAL_SRC_FILES := libust-initializer.c
LOCAL_C_INCLUDES += \
        $(LOCAL_PATH) \
        $(LOCAL_PATH)/include \
        external/userspace-rcu-0.4.6
include $(BUILD_SHARED_LIBRARY)
===============================================================


The Makefile.am looks like this
=========================================================================

ACLOCAL_AMFLAGS = -I config

# The order here is tricky. SUBDIRS applies both to compilation and
# installation. Programs depending on the libs must be built after
# libust and '.' (that contains the linker script). However, '.'
# must be installed after libust so it can overwrite libust.so with
# the linker script.
SUBDIRS = snprintf libustcomm libust . tests libustinstr-malloc libustd ustd
ustctl libustfork include doc

EXTRA_DIST = libust.ldscript.in libust-initializer.c
dist_bin_SCRIPTS = usttrace

ldscriptsdir = $(libdir)
ldscripts_DATA = libust.so libust-initializer.o

CLEANFILES = $(ldscripts_DATA) ./tests/libust-initializer.Po

libust.so: libust.ldscript.in
    $(SED) -e "s@\@FORMAT\@@$(LIBFORMAT)@" < $< > $@

# It is very important to compile the initializer with PIC otherwise we
# may get obscure errors when linking to shared libraries.
libust-initializer.o: libust-initializer.c
    $(CC) $(CFLAGS) -fno-strict-aliasing -fPIC -c -I$(top_srcdir)/include -o
$@ $<
===========================================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20110420/d27352ef/attachment-0002.htm>


WARNING: multiple messages have this Message-ID
From: xing.fan0302@googlemail.com (Xing Fan)
Subject: [ltt-dev] building ust for android/arm
Date: Wed, 20 Apr 2011 19:37:49 +0200	[thread overview]
Message-ID: <BANLkTinQ5WAPzwDD-iREO9bR5cLTQOGFtw@mail.gmail.com> (raw)
Message-ID: <20110420173749.0vGXYFKhqC3nLTNeGbhALl5OYT7Rb3NDvHTK8V71H8A@z> (raw)

I am building lttng ust-0.6 for android/Arm platform.

However, I have problems to build libust.so. The error msg is:  make: *** No
rule to make target `build/core/libust-initializer.c', needed by
`out/target/product/u8500/obj/SHARED_LIBRARIES/libust_intermediates/libust-initializer.o'.
Stop.

It is very strange that the compiler tries to pick up libust-initializer.c
from build/core folder, even though I have specified that the source file is
in my LOCAL_PATH;

Anyone has clue how to write a Android.mk for this?

/Stella



My Android.mk file looks like this:
===========================================================
include $(call all-subdir-makefiles)

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE := libust
LOCAL_SRC_FILES := libust-initializer.c
LOCAL_C_INCLUDES += \
        $(LOCAL_PATH) \
        $(LOCAL_PATH)/include \
        external/userspace-rcu-0.4.6
include $(BUILD_SHARED_LIBRARY)
===============================================================


The Makefile.am looks like this
=========================================================================

ACLOCAL_AMFLAGS = -I config

# The order here is tricky. SUBDIRS applies both to compilation and
# installation. Programs depending on the libs must be built after
# libust and '.' (that contains the linker script). However, '.'
# must be installed after libust so it can overwrite libust.so with
# the linker script.
SUBDIRS = snprintf libustcomm libust . tests libustinstr-malloc libustd ustd
ustctl libustfork include doc

EXTRA_DIST = libust.ldscript.in libust-initializer.c
dist_bin_SCRIPTS = usttrace

ldscriptsdir = $(libdir)
ldscripts_DATA = libust.so libust-initializer.o

CLEANFILES = $(ldscripts_DATA) ./tests/libust-initializer.Po

libust.so: libust.ldscript.in
    $(SED) -e "s@\@FORMAT\@@$(LIBFORMAT)@" < $< > $@

# It is very important to compile the initializer with PIC otherwise we
# may get obscure errors when linking to shared libraries.
libust-initializer.o: libust-initializer.c
    $(CC) $(CFLAGS) -fno-strict-aliasing -fPIC -c -I$(top_srcdir)/include -o
$@ $<
===========================================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.casi.polymtl.ca/pipermail/ltt-dev/attachments/20110420/d27352ef/attachment.htm>


WARNING: multiple messages have this Message-ID
From: xing.fan0302@googlemail.com (Xing Fan)
Subject: [ltt-dev] building ust for android/arm
Date: Wed, 20 Apr 2011 19:37:49 +0200	[thread overview]
Message-ID: <BANLkTinQ5WAPzwDD-iREO9bR5cLTQOGFtw@mail.gmail.com> (raw)
Message-ID: <20110420173749.JaG7sgPJVjZboci8t53oNZueKiBKrxywdlWIZKwE-hw@z> (raw)

I am building lttng ust-0.6 for android/Arm platform.

However, I have problems to build libust.so. The error msg is:  make: *** No
rule to make target `build/core/libust-initializer.c', needed by
`out/target/product/u8500/obj/SHARED_LIBRARIES/libust_intermediates/libust-initializer.o'.
Stop.

It is very strange that the compiler tries to pick up libust-initializer.c
from build/core folder, even though I have specified that the source file is
in my LOCAL_PATH;

Anyone has clue how to write a Android.mk for this?

/Stella



My Android.mk file looks like this:
===========================================================
include $(call all-subdir-makefiles)

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE := libust
LOCAL_SRC_FILES := libust-initializer.c
LOCAL_C_INCLUDES += \
        $(LOCAL_PATH) \
        $(LOCAL_PATH)/include \
        external/userspace-rcu-0.4.6
include $(BUILD_SHARED_LIBRARY)
===============================================================


The Makefile.am looks like this
=========================================================================

ACLOCAL_AMFLAGS = -I config

# The order here is tricky. SUBDIRS applies both to compilation and
# installation. Programs depending on the libs must be built after
# libust and '.' (that contains the linker script). However, '.'
# must be installed after libust so it can overwrite libust.so with
# the linker script.
SUBDIRS = snprintf libustcomm libust . tests libustinstr-malloc libustd ustd
ustctl libustfork include doc

EXTRA_DIST = libust.ldscript.in libust-initializer.c
dist_bin_SCRIPTS = usttrace

ldscriptsdir = $(libdir)
ldscripts_DATA = libust.so libust-initializer.o

CLEANFILES = $(ldscripts_DATA) ./tests/libust-initializer.Po

libust.so: libust.ldscript.in
    $(SED) -e "s@\@FORMAT\@@$(LIBFORMAT)@" < $< > $@

# It is very important to compile the initializer with PIC otherwise we
# may get obscure errors when linking to shared libraries.
libust-initializer.o: libust-initializer.c
    $(CC) $(CFLAGS) -fno-strict-aliasing -fPIC -c -I$(top_srcdir)/include -o
$@ $<
===========================================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20110420/d27352ef/attachment-0003.htm>


             reply	other threads:[~2011-04-20 17:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-20 17:37 Xing Fan [this message]
2011-04-20 17:37 ` Xing Fan
2011-04-20 17:37 ` Xing Fan
2011-04-20 18:12 ` Mathieu Desnoyers
2011-04-20 19:38   ` Xing Fan
2011-04-20 19:38     ` Xing Fan
2011-04-20 19:38     ` Xing Fan
2011-04-20 20:39     ` Mathieu Desnoyers
     [not found]     ` <BLU0-SMTP138D8FC21BF014372219BA96930@phx.gbl>
2011-04-20 21:12       ` Karim Yaghmour
2011-04-20 21:21         ` Xing Fan
2011-04-20 21:21           ` Xing Fan
2011-04-20 21:21           ` Xing Fan
2011-04-20 21:31           ` Mathieu Desnoyers
2011-04-20 23:20           ` Karim Yaghmour
2011-04-20 23:38 ` Matthew Khouzam
2011-04-20 23:38   ` Matthew Khouzam
2011-04-20 23:38   ` Matthew Khouzam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTinQ5WAPzwDD-iREO9bR5cLTQOGFtw@mail.gmail.com \
    --to=xing.fan0302@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox