On Thu, Nov 12, 2009 at 03:40:46AM -0800, uday kiran wrote:
> Hi John..
> 
> Im trying to build OpenCORE outside of Android(Ubuntu-9.04)
> 
> I followed the instructions given in quich_start.txt.. I want to knwo
> some details regarding this.
> 
> 1) Is thr any memory constraints related to this build?
> 2) How much time it will take to build ?
> 
> Because after giving "make -j" command after some time my system is
> got hanged..
> 
> i think build process is going on internally, i dont think so??
> U have good idea on this if im not wrong because u already did it
> right??
> Pls help me if im going wrong...
> 
> any help would greatly appreciated.

Hi uday kiran,

`make -j' works for me, so maybe you can try the `--debug' option of
gnu make to find out what's happening before hanging. BTW, enclosed
please find the patches I created to compile successfully. I probably
should send them to review.source but I don't have the time now..

Regards,
John

> On Nov 12, 1:56 pm, John Lee <[email protected]> wrote:
> > Hi Ravi,
> >
> > The same problem happens in several places. I also have to fix
> >
> > H223LogicalChannel::~H223LogicalChannel()
> > PVCommsIONodePort::~PVCommsIONodePort()
> >
> > I have tried a similar method to fix this before, but
> > pv2way_omx_engine_test will hang after some more tests, and I'm not
> > sure if it's related. Will start tracing that. Here is the results
> > after I set iPortActivityHandler to NULL in all 3 places:
> >
> > [output]
> >
> > Start avtest, proxy 1,Audio SrcFormat:X-AMR-IF2 Audio SinkFormat:X-AMR-IF2 
> > Video SourceFormat:X-YUV-420 Video SinkFormat:video/MP4V-ES
> > Indication with logical channel #6 Audio outgoing Track
> > Indication with logical channel #7 Video outgoing Track
> > Indication with logical channel #65542 Audio incoming Track
> > Indication with logical channel #65543 Video incoming Track
> > Start avtest, proxy 1,Audio SrcFormat:X-AMR-IF2 Audio SinkFormat:X-AMR-IF2 
> > Video SourceFormat:video/MP4V-ES Video SinkFormat:X-YUV-420
> > Indication with logical channel #6 Audio outgoing Track
> > Indication with logical channel #7 Video outgoing Track
> > Indication with logical channel #65542 Audio incoming Track
> >
> > [hang, ctrl-c, backtrace]
> >
> > (gdb) bt
> > #0  0xf7fdf430 in __kernel_vsyscall ()
> > #1  0xf76501f5 in pthread_cond_wait@@GLIBC_2.3.2 () from 
> > /lib32/libpthread.so.0
> > #2  0xf7b6637b in OsclSemaphore::Wait (this=0x807c278)
> >     at 
> > /home/john/scm/mydroid/external/opencore/oscl/oscl/osclproc/src/oscl_semaphore.cpp:116
> > #3  0xf7b647e6 in OsclReadyQ::WaitAndPopTop (this=0x807c218)
> >     at 
> > /home/john/scm/mydroid/external/opencore/oscl/oscl/osclproc/src/oscl_scheduler_readyq.cpp:123
> > #4  0xf7b60f99 in OsclExecSchedulerCommonBase::WaitForReadyAO 
> > (this=0x807c168)
> >     at 
> > /home/john/scm/mydroid/external/opencore/oscl/oscl/osclproc/src/oscl_scheduler.cpp:1380
> > #5  0xf7b60d97 in OsclExecSchedulerCommonBase::BlockingLoopL 
> > (this=0x807c168)
> >     at 
> > /home/john/scm/mydroid/external/opencore/oscl/oscl/osclproc/src/oscl_scheduler.cpp:1290
> > #6  0xf7b5fcfe in OsclExecSchedulerCommonBase::StartScheduler 
> > (this=0x807c168, aSignal=0x0)
> >     at 
> > /home/john/scm/mydroid/external/opencore/oscl/oscl/osclproc/src/oscl_scheduler.cpp:797
> > #7  0x0805dc9f in av_test::test (this=0x819a1e0)
> >     at 
> > /home/john/scm/mydroid/external/opencore/engines/2way/test/src/av_test.cpp:51
> > #8  0x08062a47 in test_case::run_test (this=0x819a1e0)
> >     at 
> > /home/john/scm/mydroid/external/opencore/oscl/unit_test/src/test_case.cpp:57
> > #9  0x080629c6 in test_case::run_subtests (this=0xffffcaf4)
> >     at 
> > /home/john/scm/mydroid/external/opencore/oscl/unit_test/src/test_case.cpp:44
> > #10 0x08062a35 in test_case::run_test (this=0xffffcaf4)
> >     at 
> > /home/john/scm/mydroid/external/opencore/oscl/unit_test/src/test_case.cpp:55
> > #11 0x080556da in start_test () at 
> > /home/john/scm/mydroid/external/opencore/engines/2way/test/src/test_engine.cpp:852
> > #12 0x08055602 in test_wrapper () at 
> > /home/john/scm/mydroid/external/opencore/engines/2way/test/src/test_engine.cpp:761
> > #13 0x08055659 in local_main (filehandle=0xf761b4c0, 
> > command_line=0xffffcc10)
> >     at 
> > /home/john/scm/mydroid/external/opencore/engines/2way/test/src/test_engine.cpp:790
> > #14 0x08064bd0 in main (argc=1, argv=0xffffccf4)
> >     at 
> > /home/john/scm/mydroid/external/opencore/oscl/unit_test/src/unit_test_main.cpp:70
> >
> > Regards,
> > John
> >
> > On Wed, Nov 11, 2009 at 06:52:09AM -0800, RaviY wrote:
> > > We found a similar problem. Please try to set "iPortActivityHandler to
> > > NULL" in the destructor of "H223LowerLayer".
> >
> > > -Ravi
> >
> > > On Nov 11, 8:12 am, John Lee <[email protected]> wrote:
> > > > Hi list,
> >
> > > > I've been trying to compile and run opencore on native PC following
> > > > the instructions in quick_start.txt . The reason I want to do this is
> > > > that it's supposed to be easier to work on host pc since what I want
> > > > to do is not hardware dependent, but so far it doesn't seem to be the
> > > > case. After 8 bug fix commits I managed to finish the compilation, but
> > > > other problem follows.  Here is the problem description:
> >
> > > > Since H223LowerLayer is both PvmfPortBaseImpl and
> > > > PVMFPortActivityHandler, it sends itself to the constructor of
> > > > PvmfPortBaseImpl to act as its iPortActivityHandler. During the
> > > > destruction of PvmfPortBaseImpl,
> > > > iPortActivityHandler->HandlePortActivity will be called.  The problem
> > > > is, the real implementation of HandlePortActivity lies inside
> > > > H223LowerLayer, and the order of destruction is:
> >
> > > > ~H223LowerLayer
> > > > ~PvmfPortBaseImpl
> > > >   iPortActivityHandler->HandlePortActivity
> >
> > > > So when HandlePortActivity is actually invoked,
> > > > H223LowerLayer::HandlePortActivity() is already invalid, and the code
> > > > path falls to PVMFPortActivityHandler::HandlePortActivity, which is a
> > > > pure virtual function. This will cause a SIGABRT:
> >
> > > > pure virtual method called
> > > > terminate called without an active exception
> >
> > > > Program received signal SIGABRT, Aborted.
> >
> > > > (Backtrace enclosed.)
> >
> > > > p.s. Here is the snipped source code related to this issue:
> >
> > > > external/opencore/protocols/systems/3g-324m_pvterminal/h223/include/lowerlayer.h:
> > > > class H223LowerLayer : public PvmfPortBaseImpl,
> > > >         public PVMFPortActivityHandler
> >
> > > > };
> >
> > > > external/opencore/pvmi/pvmf/include/pvmf_port_base_impl.h:
> > > > class PvmfPortBaseImpl : public PVMFPortInterface
> > > > {
> > > >         OSCL_IMPORT_REF PvmfPortBaseImpl(int32 aPortTag, 
> > > > PVMFPortActivityHandler* aNode, const char*name = NULL);
> >
> > > > };
> >
> > > > external/opencore/pvmi/pvmf/include/pvmf_port_interface.h:
> > > > class PVMFPortInterface
> > > > {
> > > >         PVMFPortActivityHandler *iPortActivityHandler;
> >
> > > > };
> >
> > > > external/opencore/pvmi/pvmf/include/pvmf_node_interface.h:
> > > > class PVMFPortActivityHandler
> > > > {
> > > >     public:
> > > >         virtual ~PVMFPortActivityHandler() {}
> > > >         virtual void HandlePortActivity(const PVMFPortActivity &) = 0;
> >
> > > > };
> >
> > > > implementation:
> >
> > > > external/opencore/protocols/systems/3g-324m_pvterminal/h223/src/lowerlayer.cpp:
> > > > H223LowerLayer::H223LowerLayer(int32 aPortTag, TPVLoopbackMode 
> > > > aLoopbackMode)
> > > >         :   PvmfPortBaseImpl(aPortTag, this),
> > > > {
> >
> > > > }
> >
> > > > external/opencore/pvmi/pvmf/src/pvmf_port_base_impl.cpp:
> > > > OSCL_EXPORT_REF PvmfPortBaseImpl::PvmfPortBaseImpl(int32 aTag, 
> > > > PVMFPortActivityHandler* aNode, const char*name)
> > > >         : PVMFPortInterface(aNode),
> > > > {
> >
> > > > }
> >
> > > > OSCL_EXPORT_REF PvmfPortBaseImpl::~PvmfPortBaseImpl()
> > > > {
> > > >     PortActivity(PVMF_PORT_ACTIVITY_DELETED);
> >
> > > > }
> >
> > > > OSCL_EXPORT_REF void 
> > > > PvmfPortBaseImpl::PortActivity(PVMFPortActivityType aActivity)
> > > > {
> > > >     if (iPortActivityHandler)
> > > >     {
> > > >         PVMFPortActivity activity(this, aActivity);
> > > >         iPortActivityHandler->HandlePortActivity(activity);
> > > >     }
> >
> > > > }
> >
> > > >  bt.txt
> > > > 4KViewDownload
> >
> > > --
> > > unsubscribe: [email protected]
> > > website:http://groups.google.com/group/android-porting
> 
> -- 
> unsubscribe: [email protected]
> website: http://groups.google.com/group/android-porting
> 

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
>From 8d23d7c249cc000e88b35f703cfe8cf67788d282 Mon Sep 17 00:00:00 2001
From: John Lee <[email protected]>
Date: Wed, 4 Nov 2009 12:06:57 +0800
Subject: [PATCH 1/8] [opencore] Host compiling does not work on amd64. Force -m32

---
 tools_v2/build/make/g++.mk |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/tools_v2/build/make/g++.mk b/tools_v2/build/make/g++.mk
index 8cbccfc..fd00dc1 100644
--- a/tools_v2/build/make/g++.mk
+++ b/tools_v2/build/make/g++.mk
@@ -14,10 +14,12 @@ override SYSLIBS = -lc -lm -ldl -lstdc++ -lpthread
 
 SHARED_CFLAGS ?= -fPIC
 SHARED_CXXFLAGS ?= -fPIC
-SHARED_PRE_LDFLAGS ?= -shared -Wl,-Bsymbolic -Wl,--allow-multiple-definition -Wl,--whole-archive
+SHARED_PRE_LDFLAGS ?= -m32 -shared -Wl,-Bsymbolic -Wl,--allow-multiple-definition -Wl,--whole-archive
 SHARED_POST_LDFLAGS ?= -Wl,-no-whole-archive -Wl,--no-undefined $(SYSLIBS)
 SONAME_ARG := -Wl,-h,
 
+PRE_LDFLAGS := -m32
+
 STRIP_FLAGS := --strip-unneeded
 AR_ARGS := rl # make sure to leave a space at the end
 
@@ -38,7 +40,7 @@ DEBUG_CXXFLAGS?=-g
 RELEASE_CPPFLAGS?=-DNDEBUG
 OPT_CXXFLAG?=-O3
 INCDIRS += -I$(BUILD_ROOT)/installed_include
-CXXFLAGS?=-Wall -Wno-non-virtual-dtor
+CXXFLAGS?=-Wall -Wno-non-virtual-dtor -m32
 
 #########################################################
 # $(call make-depend,source-file,object-file,depend-file,xflags)
-- 
1.6.3.3

>From 87a1412638c9690f63fb894c07f7627798e696e5 Mon Sep 17 00:00:00 2001
From: John Lee <[email protected]>
Date: Wed, 4 Nov 2009 11:33:52 +0800
Subject: [PATCH 2/8] [opencore] Replace fprintf by fputs to fix host compiling error.

---
 engines/2way/test/src/test_engine.cpp             |    2 +-
 engines/player/test/src/test_pv_player_engine.cpp |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/engines/2way/test/src/test_engine.cpp b/engines/2way/test/src/test_engine.cpp
index 11852d9..438398e 100644
--- a/engines/2way/test/src/test_engine.cpp
+++ b/engines/2way/test/src/test_engine.cpp
@@ -856,7 +856,7 @@ int start_test()
 
     text_test_interpreter interp;
     _STRING rs = interp.interpretation(engine_tests.last_result());
-    fprintf(fileoutput, rs.c_str());
+    fputs(rs.c_str(), fileoutput);
     const test_result the_result = engine_tests.last_result();
 
     return(the_result.success_count() != the_result.total_test_count());
diff --git a/engines/player/test/src/test_pv_player_engine.cpp b/engines/player/test/src/test_pv_player_engine.cpp
index ad56cb8..6be1ed8 100644
--- a/engines/player/test/src/test_pv_player_engine.cpp
+++ b/engines/player/test/src/test_pv_player_engine.cpp
@@ -1887,7 +1887,7 @@ int _local_main(FILE *filehandle, cmd_line *command_line, bool& aPrintDetailedMe
         // Print out the results
         text_test_interpreter interp;
         _STRING rs = interp.interpretation(engine_tests->last_result());
-        fprintf(file, rs.c_str());
+        fputs(rs.c_str(), file);
 
         const test_result the_result = engine_tests->last_result();
         delete engine_tests;
-- 
1.6.3.3

>From 76558969e7ca10dfc817021dc1d1a73117eeb78c Mon Sep 17 00:00:00 2001
From: John Lee <[email protected]>
Date: Wed, 4 Nov 2009 11:58:40 +0800
Subject: [PATCH 3/8] [opencore] Disable Android specific code during host compiling.

---
 codecs_v2/omx/omx_m4v/src/mpeg4_dec.cpp |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/codecs_v2/omx/omx_m4v/src/mpeg4_dec.cpp b/codecs_v2/omx/omx_m4v/src/mpeg4_dec.cpp
index 8ca5e46..29c7a5b 100644
--- a/codecs_v2/omx/omx_m4v/src/mpeg4_dec.cpp
+++ b/codecs_v2/omx/omx_m4v/src/mpeg4_dec.cpp
@@ -28,9 +28,14 @@
 #define PVH263DEFAULTHEIGHT 288
 #define PVH263DEFAULTWIDTH 352
 
+#ifdef ANDROID
 #include <utils/Log.h>
 #undef LOG_TAG
 #define LOG_TAG "SW_DEC"
+#else
+#define LOGE(x)
+#endif /* ANDROID */
+
 // from m4v_config_parser.h
 OSCL_IMPORT_REF int16 iGetM4VConfigInfo(uint8 *buffer, int32 length, int32 *width, int32 *height, int32 *, int32 *);
 
-- 
1.6.3.3

>From 156341b6e0a47595521feaa8436c70c702ef04d6 Mon Sep 17 00:00:00 2001
From: John Lee <[email protected]>
Date: Wed, 4 Nov 2009 12:01:58 +0800
Subject: [PATCH 4/8] [opencore] Add missing include path to fix host compiling error.

---
 .../build_opencore/make/local.mk                   |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/nodes/pvmp4ffcomposernode/build_opencore/make/local.mk b/nodes/pvmp4ffcomposernode/build_opencore/make/local.mk
index e218727..da01b9b 100644
--- a/nodes/pvmp4ffcomposernode/build_opencore/make/local.mk
+++ b/nodes/pvmp4ffcomposernode/build_opencore/make/local.mk
@@ -10,7 +10,7 @@ TARGET := pvmp4ffcomposernode
 XCXXFLAGS += $(FLAG_COMPILE_WARNINGS_AS_ERRORS)
 
 
-XINCDIRS += $(SDK_LOCAL)/installed_include ../../src ../../../../nodes/common/include ../../../../pvmi/pvmf/include  ../../include  ../../../../baselibs/pv_mime_utils/src  ../../../../engines/author/include  ../../../../baselibs/media_data_structures/src  ../../../../oscl/oscl/osclio/src  ../../../../fileformats/mp4/composer/config/opencore
+XINCDIRS += $(SDK_LOCAL)/installed_include ../../src ../../../../nodes/common/include ../../../../pvmi/pvmf/include  ../../include  ../../../../baselibs/pv_mime_utils/src  ../../../../engines/author/include  ../../../../baselibs/media_data_structures/src  ../../../../oscl/oscl/osclio/src  ../../../../fileformats/mp4/composer/config/opencore ../../../../extern_libs_v2/khronos/openmax/include
 
 
 
-- 
1.6.3.3

>From 3b65e99db095637d64228f9b4b91ebf0a67ae635 Mon Sep 17 00:00:00 2001
From: John Lee <[email protected]>
Date: Wed, 4 Nov 2009 12:03:06 +0800
Subject: [PATCH 5/8] [opencore] Add missing source file to fix host compiling error.

---
 pvmi/pvmf/build/make/local.mk |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/pvmi/pvmf/build/make/local.mk b/pvmi/pvmf/build/make/local.mk
index 477ea85..d4824cf 100644
--- a/pvmi/pvmf/build/make/local.mk
+++ b/pvmi/pvmf/build/make/local.mk
@@ -26,7 +26,8 @@ SRCS := pvmf_format_type.cpp \
 	pvmf_media_clock.cpp \
 	pvmf_duration_infomessage.cpp \
 	pvmf_metadata_infomessage.cpp \
-	pvmf_return_codes.cpp
+	pvmf_return_codes.cpp \
+	pvmf_event_handling.cpp
 
 HDRS :=  pv_interface.h \
          pvmf_node_interface.h \
-- 
1.6.3.3

>From 1dd23cbca419b5f8965fe82f50af689e6f72e3c7 Mon Sep 17 00:00:00 2001
From: John Lee <[email protected]>
Date: Wed, 4 Nov 2009 12:05:22 +0800
Subject: [PATCH 6/8] [opencore] Add missing header files and #define to fix host compiling.

---
 .../omx/omx_proxy/src/pv_omx_interface_proxy.cpp   |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/codecs_v2/omx/omx_proxy/src/pv_omx_interface_proxy.cpp b/codecs_v2/omx/omx_proxy/src/pv_omx_interface_proxy.cpp
index bce092b..740bb4d 100644
--- a/codecs_v2/omx/omx_proxy/src/pv_omx_interface_proxy.cpp
+++ b/codecs_v2/omx/omx_proxy/src/pv_omx_interface_proxy.cpp
@@ -43,6 +43,13 @@
 #include "pvlogger.h"
 #endif
 
+#ifndef ANDROID
+#include <sys/time.h>
+#include <sys/resource.h>
+/* This is Android specific and should not be here in the first place */
+#define ANDROID_PRIORITY_AUDIO	(-16)
+#endif /* ANDROID */
+
 OSCL_DLL_ENTRY_POINT_DEFAULT()
 
 #if PROXY_INTERFACE
-- 
1.6.3.3

>From ea94b3204f2d5afef5fb475030496c9f6a6da044 Mon Sep 17 00:00:00 2001
From: John Lee <[email protected]>
Date: Wed, 4 Nov 2009 12:08:13 +0800
Subject: [PATCH 7/8] [opencore] Fix dynamic linking error.

tools_v2/build/make/prog.mk assumes that every library is static. Move
the dynamic linked libraries from LIBS to LDFLAGS.
---
 engines/player/test/build/android/local.mk |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/engines/player/test/build/android/local.mk b/engines/player/test/build/android/local.mk
index f130a22..92a6b98 100644
--- a/engines/player/test/build/android/local.mk
+++ b/engines/player/test/build/android/local.mk
@@ -40,7 +40,13 @@ SRCS := test_pv_player_engine.cpp \
         test_pv_player_engine_testset_cpmdlapassthru.cpp
 
 
-LIBS := unit_test opencore_player opencore_common
+LIBS := unit_test
+
+ifeq ($(strip $(DEFAULT_LIBMODE)),release)
+  LDFLAGS := -lopencore_player -lopencore_common
+else
+  LDFLAGS := -lopencore_player_debug -lopencore_common_debug
+endif
 
 ifneq ($(ARCHITECTURE),win32)
   SYSLIBS = -lpthread -ldl
-- 
1.6.3.3

>From 0129f48877f9e485e23c01012de1628cde6becaf Mon Sep 17 00:00:00 2001
From: John Lee <[email protected]>
Date: Wed, 4 Nov 2009 15:13:57 +0800
Subject: [PATCH 8/8] [opencore] Fix host compile error caused by comparing signed and unsigned.

---
 fileformats/mp3/parser/src/mp3parser.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fileformats/mp3/parser/src/mp3parser.cpp b/fileformats/mp3/parser/src/mp3parser.cpp
index 812869c..4a8b89f 100644
--- a/fileformats/mp3/parser/src/mp3parser.cpp
+++ b/fileformats/mp3/parser/src/mp3parser.cpp
@@ -1175,7 +1175,7 @@ bool  MP3Parser::DecodeXINGHeader(uint8 *XingBuffer,
         {
             // check if the number of bytes and the file size roughly
             // match up
-            if (mp3XingHD.bytes > iLocalFileSize)
+            if ((uint32) mp3XingHD.bytes > iLocalFileSize)
             {
                 head_flags = mp3XingHD.flags = 0;
             }
-- 
1.6.3.3

Reply via email to