We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2912 - Android.mk may miss "include $(CLEAR_VARS)" ?
Summary: Android.mk may miss "include $(CLEAR_VARS)" ?
Status: RESOLVED ABANDONED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: don't know
Hardware: x86 Linux
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-17 11:24 UTC by weiwei_9591
Modified: 2018-08-06 21:20 UTC (History)
0 users

See Also:


Attachments
This patch is wrong !!! Please disgard this. (284 bytes, text/plain)
2015-03-17 11:24 UTC, weiwei_9591
Details

Note You need to log in before you can comment on or make changes to this bug.
Description weiwei_9591 2015-03-17 11:24:27 UTC
Created attachment 2069 [details]
This patch is wrong !!!
Please disgard this.

Hi,

I am a newbie to SDL2. These days, I am learning SDL2 Android.
I can compile Android project suessfully, but I seems to find a small issue that Android.mk may miss "include $(CLEAR_VARS)".
The patch is easy and show as following:

diff -uNr a/Android.mk b/Android.mk
--- a/Android.mk	2014-03-16 10:31:41.000000000 +0800
+++ b/Android.mk	2015-03-17 16:35:54.192377934 +0800
@@ -57,6 +57,8 @@
 #
 ###########################
 
+include $(CLEAR_VARS)
+
 LOCAL_MODULE := SDL2_static
 
 LOCAL_MODULE_FILENAME := libSDL2
Comment 1 weiwei_9591 2015-03-19 15:28:16 UTC
Hi, 

I am really a newbie that I find my reported bug about "miss  include $(CLEAR_VARS)" is **not** a bug indeed. 
There "include $(CLEAR_VARS)" shall not exist and I can understand now.
Really sorry.... 

However I seems to find another real bug today.

I want to use sdl2 static library and I follow steps described from "Build an app with static linking of libSDL" in README-android.txt.
I get error as following:
    Android NDK: Trying to define local module 'SDL2' in /home/weiwei/android-project/jni/SDL/Android.mk.    
    Android NDK: But this module was already defined by jni/SDL/Android.mk.    
    /home/weiwei/android-ndk-r10d/build/core/build-module.mk:34: *** Android NDK: Aborting.    .  Stop.

I find it seems to be caused by "include $(call all-subdir-makefiles)" in jni/Android.mk. 
This will cause both jni/src/Android.mk and jni/SDL/Anroid.mk to compile. 
However jni/src/Android.mk will call jni/SDL/Android.mk to compile again by "$(call import-module,SDL)LOCAL_PATH := $(call my-dir)"

My solution is very simple but not good:
After step 5, I will change jni/Anroid.mk to following
    #include $(call all-subdir-makefiles)
    LOCAL_PATH := $(call my-dir)
    include $(LOCAL_PATH)/src/Android.mk 
This will cause jni/SDL/Android.mk to only run once. 
So I can compile successfully.

Hope this time I report a real bug.

Thanks.

Jianwei Zhang
Comment 2 Ryan C. Gordon 2018-08-06 21:20:23 UTC
Hello, and sorry if you're getting dozens of copies of this message by email.

We are closing out bugs that appear to be abandoned in some form. This can happen for lots of reasons: we couldn't reproduce it, conversation faded out, the bug was noted as fixed in a comment but we forgot to mark it resolved, the report is good but the fix is impractical, we fixed it a long time ago without realizing there was an associated report, etc.

Individually, any of these bugs might have a better resolution (such as WONTFIX or WORKSFORME or INVALID) but we've added a new resolution of ABANDONED to make this easily searchable and make it clear that it's not necessarily unreasonable to revive a given bug report.

So if this bug is still a going concern and you feel it should still be open: please feel free to reopen it! But unless you respond, we'd like to consider these bugs closed, as many of them are several years old and overwhelming our ability to prioritize recent issues.

(please note that hundred of bug reports were sorted through here, so we apologize for any human error. Just reopen the bug in that case!)

Thanks,
--ryan.