Re: [Firebird-devel] Error compiling FB for android

2018-02-08 Thread Alex Peshkoff via Firebird-devel

On 01/21/18 14:18, Jorge Gonçalves wrote:

After some progress I'm blocked...



What is missing?




Did you choose master branch with knowledge that it is highly 
experimental or stable B3_0_Release (firebird-3) may be better for you?
Anyway - I've fixed android build in master, new features requiring new 
libraries were added to it, android build was missing them.




ps : I have found some other problems that I have "solved" changing 2 
source files:


1 :  HAVE_CTIME_R  is not defined



This is fixed on github now.



2: HAVE_SIGSET



Here I'm surprised - I do not believe that google added this deprecated 
function to android. Firebird successfully builds w/o this define.




--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Error compiling FB for android

2018-01-21 Thread Jorge Gonçalves
After some progress I'm blocked...



make[4]: Leaving directory '/home/jgoncalves/dev/firebird/gen'
make fbintl
make[4]: Entering directory '/home/jgoncalves/dev/firebird/gen'
make[4]: Nothing to be done for 'fbintl'.
make[4]: Leaving directory '/home/jgoncalves/dev/firebird/gen'
make utilities
make[4]: Entering directory '/home/jgoncalves/dev/firebird/gen'
/home/jgoncalves/dev/android/ndk/bin/arm-linux-androideabi-g++  -pthread
-std=c++11 --sysroot=/home/jgoncalves/dev/android/ndk/sysroot
-L/home/jgoncalves/dev/firebird/build
-L/home/jgoncalves/dev/android/ndk/arm-linux-androideabi/lib
-Wl,-rpath,'$ORIGIN/../lib' -Wl,-rpath,'$ORIGIN/../intl'
-Wl,--version-script,empty.vers
/home/jgoncalves/dev/firebird/temp/Release/remote/inet.o
/home/jgoncalves/dev/firebird/temp/Release/remote/merge.o
/home/jgoncalves/dev/firebird/temp/Release/remote/parser.o
/home/jgoncalves/dev/firebird/temp/Release/remote/protocol.o
/home/jgoncalves/dev/firebird/temp/Release/remote/remote.o
/home/jgoncalves/dev/firebird/temp/Release/auth/SecureRemotePassword/srp.o
/home/jgoncalves/dev/firebird/temp/Release/remote/server/server.o
/home/jgoncalves/dev/firebird/temp/Release/remote/server/os/posix/inet_server.o
/home/jgoncalves/dev/firebird/temp/Release/auth/SecureRemotePassword/server/SrpServer.o
/home/jgoncalves/dev/firebird/temp/Release/common.a -o
/home/jgoncalves/dev/firebird/gen/Release/firebird/bin/firebird
-L/home/jgoncalves/dev/firebird/gen/Release/firebird/lib -lfbclient
-ltommath -ltomcrypt  -lm -ldl -lsupc++
/home/jgoncalves/dev/firebird/gen/Release/firebird/lib/libfbclient.so:
error: undefined reference to 'decDoubleToBCD'
/home/jgoncalves/dev/firebird/gen/Release/firebird/lib/libfbclient.so:
error: undefined reference to 'decQuadToBCD'
/home/jgoncalves/dev/firebird/gen/Release/firebird/lib/libfbclient.so:
error: undefined reference to 'stdout'
/home/jgoncalves/dev/firebird/src/common/utils.cpp:767: error: undefined
reference to 'stdin'
/home/jgoncalves/dev/firebird/src/common/utils.cpp:767: error: undefined
reference to 'stderr'
/home/jgoncalves/dev/firebird/src/common/utils.cpp:786: error: undefined
reference to 'stderr'
/home/jgoncalves/dev/firebird/src/common/utils.cpp:786: error: undefined
reference to 'stdin'
/home/jgoncalves/dev/firebird/src/common/DecFloat.cpp:92: error: undefined
reference to 'decContextGetStatus'
/home/jgoncalves/dev/firebird/src/common/DecFloat.cpp:96: error: undefined
reference to 'decContextZeroStatus'
/home/jgoncalves/dev/firebird/src/common/DecFloat.cpp:111: error: undefined
reference to 'decContextDefault'
/home/jgoncalves/dev/firebird/src/common/DecFloat.cpp:114: error: undefined
reference to 'decContextSetRounding'


What is missing?



ps : I have found some other problems that I have "solved" changing 2
source files:

1 :  HAVE_CTIME_R  is not defined

diff --git a/src/utilities/gstat/dba.epp b/src/utilities/gstat/dba.epp
index 897e4b0..988a99c 100644
--- a/src/utilities/gstat/dba.epp
+++ b/src/utilities/gstat/dba.epp
@@ -326,13 +326,13 @@ namespace
{
time_t t;
time(&t);
-#if defined(HAVE_CTIME_R)
+//#if defined(HAVE_CTIME_R)
ctime_r(&t, datetime);
-#elif defined(HAVE_CTIME_S)
-   ctime_s(datetime, sizeof_datetime, &t);
-#else
-   error: missing thread-safe version of ctime()
-#endif
+//#elif defined(HAVE_CTIME_S)
+// ctime_s(datetime, sizeof_datetime, &t);
+//#else
+// error: missing thread-safe version of ctime()
+//#endif
}
 } // namespace


2: HAVE_SIGSET

diff --git a/src/include/cross/android.arme b/src/include/cross/android.arme
index d2f1376..d020098 100644
--- a/src/include/cross/android.arme
+++ b/src/include/cross/android.arme
@@ -370,6 +370,7 @@

 /* Define to 1 if you have the `sigset' function. */
 /* #undef HAVE_SIGSET */
+#define HAVE_SIGSET

 /* Define to 1 if you have the `snprintf' function. */
 #define HAVE_SNPRINTF 1


what's the correct way to solve this ?





Virus-free.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Thu, Jan 18, 2018 at 10:19 AM, Alex Peshkoff via Firebird-devel <
firebird-devel@lists.sourceforge.net> wrote:

> On 01/18/18 12:47, Jorge Gonçalves wrote:
>
>> Hi,
>> I want to make some tests with FB embedded on android, and I'm getting
>> the follow error compiling the source.
>>
>>
>> 
>> /home/jgoncalves/dev/android/android-ndk-r16b/toolchains/arm
>> -linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc
>> -I/home/jgoncalves/dev/firebird/src/include/gen
>> -I/home/jgoncalves/dev/firebird/src/include  -ggdb
>> -DFB_SEND_FLAGS=MSG_NOSIGNAL -DLINUX -DANDROID -DARM -pipe -MMD -fPIC
>> -fmessage-length=0 -I/home/jgoncalves/dev/firebird/extern/libtommath
>> --sysroot=/home/jgoncalves/dev/andro

Re: [Firebird-devel] Error compiling FB for android

2018-01-18 Thread Alex Peshkoff via Firebird-devel

On 01/18/18 12:47, Jorge Gonçalves wrote:

Hi,
I want to make some tests with FB embedded on android, and I'm getting 
the follow error compiling the source.




/home/jgoncalves/dev/android/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc 
-I/home/jgoncalves/dev/firebird/src/include/gen 
-I/home/jgoncalves/dev/firebird/src/include  -ggdb 
-DFB_SEND_FLAGS=MSG_NOSIGNAL -DLINUX -DANDROID -DARM -pipe -MMD -fPIC 
-fmessage-length=0 -I/home/jgoncalves/dev/firebird/extern/libtommath 
--sysroot=/home/jgoncalves/dev/android/android-ndk-r16b/platforms/android-24/arch-arm 
-I/home/jgoncalves/dev/android/android-ndk-r16b/platforms/android-24/arch-arm/usr/include 
-I/home/jgoncalves/dev/firebird/gen/cross 
-I/home/jgoncalves/dev/android/android-ndk-r16b/sources/cxx-stl/gnu-libstdc++/4.9/include 
-I/home/jgoncalves/dev/android/android-ndk-r16b/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/include 
-fno-omit-frame-pointer -pthread -pthread  -c 
../extern/libtommath/bn_error.c -o ../extern/libtommath/bn_error.o

In file included from ../extern/libtommath/bn_error.c:1:0:
/home/jgoncalves/dev/firebird/extern/libtommath/tommath.h:18:19: fatal 
error: stdio.h: No such file or directory

 #include 
                   ^
compilation terminated.
make.rules:99: recipe for target '../extern/libtommath/bn_error.o' failed
make[4]: *** [../extern/libtommath/bn_error.o] Error 1
make[4]: Leaving directory '/home/jgoncalves/dev/firebird/gen'
...


the command used to configure/compile was taken from the Mariuz's Blog 
and is:


./autogen.sh --with-system-editline --enable-binreloc 
--with-cross-build=android.arme



OS : Ubuntu16.04
FB version : FB4
NDK : android-ndk-r16b

places where stdio.h was found on NDK

./sources/android/support/include/stdio.h
./sources/cxx-stl/llvm-libc++/include/stdio.h
./sources/cxx-stl/stlport/stlport/stdio.h
./sources/cxx-stl/gnu-libstdc++/4.9/include/tr1/stdio.h
./sysroot/usr/include/bits/fortify/stdio.h
./sysroot/usr/include/stdio.h



Any help will be appreciated.



Looks like the reason is changed by google structure of NDK.
Earlier /usr/include was placed into 
./platforms/android-/arch- (like 
./platforms/android-21/arch-arm).

Now it is in ./sysroot.

You have a choice:
1) Change CROSS_PLATFORM in make.android.arme
Ideally we need NDK-version dependent code in make.android.*

2) Use older NDK (sorry can't recommend particular version)




--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel