SynoCommunity / spksrc

Cross compilation framework to create native packages for the Synology's NAS
https://synocommunity.com
Other
3.02k stars 1.23k forks source link

Seafile SPK #1132

Closed cytec closed 7 years ago

cytec commented 10 years ago

seems to be a nice dropbox replacement, anyone made some steps in this direction already?

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

cytec commented 10 years ago

so i've got a working installation with the debian chroot but was not able to compile it into a standalone spk, seems like there are to much deps :/

maybe @Diaoul or @Dr-Bean can have a look? ;)

cytec commented 10 years ago

well like i thought there are a lot of deps for Seafile, i was able to compile most of them (hopefully) but sadly i'm running into errors when i try to build libzdb which somehow throws out an error that ld cant find -lfl even if i depend on cross/flex

i've started a new dry run a few minutes ago, maybe that helps, if not im gonna report back here

cytec commented 10 years ago

sadly still the same effect fails with errors on libzdb:

make[3]: Entering directory `/home/cytec/spksrc/cross/libzdb'
===>  Configuring for libzdb
cd /home/cytec/spksrc/cross/seafile/work-cedarview/libzdb-master;./autogen.sh
processing .
Creating ./aclocal.m4 ...
Making ./aclocal.m4 writable ...
Running libtoolize...
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `config'.
libtoolize: copying file `config/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
Running aclocal  -I m4 ...
Running autoheader...
Running automake --gnu  ...
configure.ac:9: installing `config/config.guess'
configure.ac:9: installing `config/config.sub'
Running autoconf ...
cd /home/cytec/spksrc/cross/seafile/work-cedarview/libzdb-master && env LDFLAGS=" - L/home/cytec/spksrc/cross/seafile/work-cedarview/install/usr/local/lib "    PKG_CONFIG_LIBDIR=/home/cytec/spksrc/cross/seafile/work-cedarview/install//usr/local/lib/pkgconfig  WORK_DIR=/home/cytec/spksrc/cross/seafile/work-cedarview INSTALL_PREFIX=/usr/local TC=syno-cedarview    LD="/home/cytec/spksrc/toolchains/syno-cedarview/work/x86_64-linux-gnu/bin/x86_64-linux-gnu-ld"     LDSHARED="/home/cytec/spksrc/toolchains/syno-cedarview/work/x86_64-linux-gnu/bin/x86_64-linux-gnu-gcc - shared" CPP="/home/cytec/spksrc/toolchains/syno-cedarview/work/x86_64-linux-gnu/bin/x86_64-linux-gnu-cpp"   NM="/home/cytec/spksrc/toolchains/syno-cedarview/work/x86_64-linux-gnu/bin/x86_64-linux-gnu-nm"     CC="/home/cytec/spksrc/toolchains/syno-cedarview/work/x86_64-linux-gnu/bin/x86_64-linux-gnu-gcc"    AS="/home/cytec/spksrc/toolchains/syno-cedarview/work/x86_64-linux-gnu/bin/x86_64-linux-gnu-as"     RANLIB="/home/cytec/spksrc/toolchains/syno-cedarview/work/x86_64-linux-gnu/bin/x86_64-linux-gnu-ranlib"     CXX="/home/cytec/spksrc/toolchains/syno-cedarview/work/x86_64-linux-gnu/bin/x86_64-linux-gnu-g++"   AR="/home/cytec/spksrc/toolchains/syno-cedarview/work/x86_64-linux-gnu/bin/x86_64-linux-gnu-ar"     STRIP="/home/cytec/spksrc/toolchains/syno-cedarview/work/x86_64-linux-gnu/bin/x86_64-linux-gnu-strip"   OBJDUMP="/home/cytec/spksrc/toolchains/syno-cedarview/work/x86_64-linux-gnu/bin/x86_64-linux-gnu-   objdump" READELF="/home/cytec/spksrc/toolchains/syno-cedarview/work/x86_64-linux-gnu/bin/x86_64-linux-gnu   -readelf" CFLAGS=" -I/home/cytec/spksrc/cross/seafile/work-cedarview/install//usr/local/include " CPPFLAGS=" -  I/home/cytec/spksrc/cross/seafile/work-cedarview/install//usr/local/include " CXXFLAGS=" -  I/home/cytec/spksrc/cross/seafile/work-cedarview/install//usr/local/include " LDFLAGS=" -   L/home/cytec/spksrc/cross/seafile/work-cedarview/install//usr/local/lib -Wl,--rpath-    link,/home/cytec/spksrc/cross/seafile/work-cedarview/install//usr/local/lib -Wl,--rpath,/usr/local/lib " ./configure    --host=x86_64-linux-gnu --build=i686-pc-linux --prefix=/usr/local 
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for x86_64-linux-gnu-strip... /home/cytec/spksrc/toolchains/syno-cedarview/work/x86_64-linux-  gnu/bin/x86_64-linux-gnu-strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking build system type... i686-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for WIN32... no
checking for x86_64-linux-gnu-gcc... /home/cytec/spksrc/toolchains/syno-cedarview/work/x86_64-linux-    gnu/bin/x86_64-linux-gnu-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /home/cytec/spksrc/toolchains/syno-cedarview/work/x86_64-linux-gnu/bin/x86_64-linux-gnu-   gcc accepts -g... yes
checking for /home/cytec/spksrc/toolchains/syno-cedarview/work/x86_64-linux-gnu/bin/x86_64-linux-gnu-gcc    option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of /home/cytec/spksrc/toolchains/syno-cedarview/work/x86_64-linux-gnu/bin/x86_64- linux-gnu-gcc... none
checking how to run the C preprocessor... /home/cytec/spksrc/toolchains/syno-cedarview/work/x86_64-linux-   gnu/bin/x86_64-linux-gnu-cpp
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking whether /home/cytec/spksrc/toolchains/syno-cedarview/work/x86_64-linux-gnu/bin/x86_64-linux-gnu-   gcc needs -traditional... no
checking for re2c... re2c_not_found
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... -lfl
checking whether yytext is a pointer... yes
/home/cytec/spksrc/toolchains/syno-cedarview/work/x86_64-linux-gnu/bin/../lib/gcc/x86_64-linux-gnu/4.2.0/../..  /../../x86_64-linux-gnu/bin/ld: cannot find -lfl
collect2: ld returned 1 exit status
configure: error: Failed to build tools
make[3]: *** [configure_target] Fehler 1    
tildeslash commented 10 years ago

Use latest version of libzdb which can be downloaded from http://tildeslash.com/libzdb/

cytec commented 10 years ago

@tildeslash sadly it's not working:

checking for library containing sqlite3_open... -lsqlite3
checking for library containing sqlite3_soft_heap_limit... none required
checking for library containing sqlite3_soft_heap_limit64... none required
checking for library containing sqlite3_errstr... none required
checking for oracle... checking if Oracle support is enabled... no
checking for ANSI C header files... (cached) yes
configure: error: in `/home/cytec/spksrc/cross/seafile/work-cedarview/libzdb-3.0':
configure: error: cannot run test program while cross compiling 
tildeslash commented 10 years ago

Ah, cross compile. Libzdb will build and compile just fine on all (POSIX) platforms, but no work has been done with configure to test and ensure that cross compile works. Sorry, you're on your own.

Diaoul commented 10 years ago

@cytec: it's a common issue when cross compiling, you need to patch the configure script to skip that test. Look other cross/* for examples.

cytec commented 10 years ago

@Diaoul yeah i've got those things working, sadly it seems like there are missing some header files from searpc because im getting a lot of undefined reference and/or implicit declaration errors when i try to compile ccnet...