After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 759380 - Fail to build Android NDK projects with multiple Java files
Fail to build Android NDK projects with multiple Java files
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: cerbero
git master
Other Linux
: Normal normal
: 1.6.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-12-12 00:52 UTC by Martin Kelly
Modified: 2015-12-14 09:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix gstreamer-1.0.mk build bug (2.28 KB, patch)
2015-12-12 00:52 UTC, Martin Kelly
committed Details | Review

Description Martin Kelly 2015-12-12 00:52:24 UTC
Created attachment 317244 [details] [review]
Fix gstreamer-1.0.mk build bug

I have found that, when building Android NDK projects with multiple files getting installed in org/freedesktop/gstreamer, gstreamer-1.0.mk fails with errors like this:

cp: target ‘X’ is not a directory

I traced the error down to a missing ";" character in the following lines:

gstreamer-1.0.mk:247
  @$(foreach file,$(GSTREAMER_PLUGINS_CLASSES), \
    $(call host-cp, \
    $(GSTREAMER_NDK_BUILD_PATH)$(file), \
    $(GSTREAMER_JAVA_SRC_DIR)/org/freedesktop/gstreamer/$(file)))

The problem is that make joins multiple calls inside foreach with " ", unless you add a ";" character, in which case it joins them with "\n". Thus when the ";" character is missing, cp gets confused. By adding it, the issue goes away and the correct copy occurs. More information below:

http://stackoverflow.com/questions/30220311/what-does-semicolon-termination-inside-a-makefiles-define-directive-do

The attached patch fixes this issue and a few others, caused by the same issue.
Comment 1 Sebastian Dröge (slomo) 2015-12-12 04:50:52 UTC
Comment on attachment 317244 [details] [review]
Fix gstreamer-1.0.mk build bug

Thanks, makes sense. I'll merge this later
Comment 2 Sebastian Dröge (slomo) 2015-12-14 09:13:09 UTC
commit 43c7159d2e2e704b8acd6b002661abc0fcecc380
Author: Martin Kelly <martin@surround.io>
Date:   Thu Dec 10 16:55:43 2015 -0800

    gstreamer-1.0.mk: fix missing ";" bug
    
    Several command invocations wrapped in for-each are missing ";"
    characters, which meant they get expanded on one line instead of
    separate lines. For some for-each invocations, you can get away with
    this and it will be OK, but for something like host-cp, it changes the
    meaning. As a result, some host-cp invocations will fail with errors
    like:
    
    cp: target ‘X’ is not a directory
    
    Fix this by adding the necessary semicolons.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=759380