Skip to content

Instantly share code, notes, and snippets.

@navoytak
Forked from Logic-gate/megaSync_Installation.txt
Last active September 1, 2019 04:30
Show Gist options
  • Save navoytak/27786d8b45414a7b3c272731fb6821a5 to your computer and use it in GitHub Desktop.
Save navoytak/27786d8b45414a7b3c272731fb6821a5 to your computer and use it in GitHub Desktop.
MegaSync Client Installation | Solus
Original thread: https://dev.solus-project.com/T163
Original github gist by Logic-gates: https://gist.github.com/Logic-gate/b7c3dd955288228e7219eeb46456e7de
Clone it -- https://github.com/meganz/MEGAsync
> git clone https://github.com/meganz/MEGAsync.git
> cd MEGAsync
> git submodule update --init --recursive
Get crypto++ | I think it's already in the repo (cryptopp-devel) if not:
> wget https://www.cryptopp.com/cryptopp563.zip #Tested on version 5.6.3
> mkdir ~/crypto && cd ~/crypto && unzip ~/Downloads/cryptopp563.zip
> make libcryptopp.so libcryptopp.a If anything goes wrong make clean. Note: only .so is needed..but what the heck.
> sudo make install PREFIX=/usr
make sure everything is set
> ld -lcryptopp
You should see something like this
>> ld: warning: cannot find entry symbol _start; not setting start address
>> /usr/lib64/libcryptopp.so: undefined reference to `pthread_key_create'
>> /usr/lib64/libcryptopp.so: undefined reference to `pthread_getspecific'
>> /usr/lib64/libcryptopp.so: undefined reference to `pthread_key_delete'
>> /usr/lib64/libcryptopp.so: undefined reference to `pthread_setspecific'
Export CFLAG for c-ares
> nano src/MEGASync/mega/contrib/build_sdk.sh
Add it before ./configure on line 655 //line 501 is obsolete
"export CFLAGS="${CFLAGS/-D_FORTIFY_SOURCE=2}""
So that it looks like this
>> package_extract $name $cares_file $cares_dir
>> export CFLAGS="${CFLAGS/-D_FORTIFY_SOURCE=2}"
>> package_configure $name $cares_dir $install_dir "$cares_params"
>> package_build $name $cares_dir
>> package_install $name $cares_dir $install_dir
Get qt5-devel -- We want qmake(5) // added qt5-tools-devel
> sudo eopkg it qt5-base-devel qt5-tools-devel
OpenGl - needed due to dependency amplification
> sudo eopkg it libglu-devel
Libraw - needed in make //added as make failed without it
> sudo eopkg it libraw-devel
Qt5-svg - needed in make //added as make failed without it
> sudo eopkg it qt5-svg-devel
Sqlite3 - needed in make //added as make failed without it
> sudo eopkg it sqlite3-devel
Configure
Head back to MEGA root -- ~/MEGAsync/src
> ./configure
> qmake MEGA.pro
> lrelease MEGASync/MEGASync.pro
> make
That's it.. Exec located at MEGAsync/src/MEGASync/megasync
Additional setup for ease
> sudo cp megasync /usr/bin/megasync
> sudo nano /usr/share/applications/megasync.desktop and paste this
```
[Desktop Entry]
Type=Application
Verion=2.9.8
GenericName=File Synchronizer
Name=MEGASync
Comment=Easy Automated syncing between your computers and your MEGA cloud drive.
TryExec=megasync
Exec=megasync
Icon=mega
Terminal=False
Categories=Network;System;
StartupNotify=False
And finally to get the icon in the app tray
sudo cp MEGAsync/src/MEGASync/gui/images/app_128.png /usr/share/pixmaps/mega.png
```
NOTES:
I have this setup on 2 solus boxes. Only one of them has the MEGA icon instead of the regular folder icon. Note sure why.
@AnwarShah
Copy link

AnwarShah commented Apr 18, 2019

Thank you. I needed to install linux-headers, libmediainfo-devel package and fix a command line option in libsodium ./configure file. It was removing -V

@AnwarShah
Copy link

Also openssl

@katzmoor
Copy link

katzmoor commented Sep 1, 2019

Received error during installation on Solus. Log attached.

"This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by libsodium configure 1.0.16, which was
generated by GNU Autoconf 2.69. Invocation command line was

$ ./configure --prefix=/home/watchdog1/MEGAsync/src/MEGASync/mega/bindings/qt/3rdparty --disable-shared --enable-static --disable-pie

---------

Platform.

---------

hostname = navi01
uname -m = x86_64
uname -r = 5.2.2-122.current
uname -s = Linux
uname -v = #1 SMP PREEMPT Wed Jul 24 01:03:42 UTC 2019

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch = x86_64
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /sbin
PATH: /bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /usr/local/bin
PATH: /snap/bin

-----------

Core tests.

-----------

configure:2424: checking build system type
configure:2438: result: x86_64-pc-linux-gnu
configure:2458: checking host system type
configure:2471: result: x86_64-pc-linux-gnu
configure:2507: checking for a BSD-compatible install
configure:2575: result: /usr/bin/install -c
configure:2586: checking whether build environment is sane
configure:2641: result: yes
configure:2790: checking for a thread-safe mkdir -p
configure:2829: result: /bin/mkdir -p
configure:2836: checking for gawk
configure:2852: found /usr/bin/gawk
configure:2863: result: gawk
configure:2874: checking whether make sets $(MAKE)
configure:2896: result: yes
configure:2925: checking whether make supports nested variables
configure:2942: result: yes
configure:3031: checking whether UID '0' is supported by ustar format
configure:3034: result: yes
configure:3041: checking whether GID '0' is supported by ustar format
configure:3044: result: yes
configure:3052: checking how to create a ustar tar archive
configure:3063: tar --version
tar (GNU tar) 1.32
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later https://gnu.org/licenses/gpl.html.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
configure:3066: $? = 0
configure:3106: tardir=conftest.dir && eval tar --format=ustar -chf - "$tardir" >conftest.tar
configure:3109: $? = 0
configure:3113: tar -xf - <conftest.tar
configure:3116: $? = 0
configure:3118: cat conftest.dir/file
GrepMe
configure:3121: $? = 0
configure:3134: result: gnutar
configure:3195: checking whether make supports nested variables
configure:3212: result: yes
configure:3224: checking whether to enable maintainer-specific portions of Makefiles
configure:3233: result: no
configure:3344: checking whether make supports the include directive
configure:3359: make -f confmf.GNU && cat confinc.out
this is the am__doit target
configure:3362: $? = 0
configure:3381: result: yes (GNU style)
configure:3432: checking for gcc
configure:3448: found /usr/bin/gcc
configure:3459: result: gcc
configure:3688: checking for C compiler version
configure:3697: gcc --version >&5
gcc (Solus) 8.3.1 20190320
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:3708: $? = 0
configure:3697: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-solus-linux/8/lto-wrapper
Target: x86_64-solus-linux
Configured with: ../configure --prefix=/usr --with-pkgversion=Solus --libdir=/usr/lib64 --libexecdir=/usr/lib64 --with-system-zlib --enable-shared --enable-threads=posix --enable-gnu-indirect-function --enable-__cxa_atexit --enable-plugin --enable-gold --enable-ld=default --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --enable-lto --with-gcc-major-version-only --with-bugurl=https://dev.solus-project.com/ --with-arch_32=i686 --enable-linker-build-id --with-linker-hash-style=gnu --with-gnu-ld --build=x86_64-solus-linux --target=x86_64-solus-linux --enable-languages=c,c++,fortran
Thread model: posix
gcc version 8.3.1 20190320 (Solus)
configure:3708: $? = 0
configure:3697: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:3708: $? = 1
configure:3697: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'; did you mean '--version'?
gcc: fatal error: no input files
compilation terminated.
configure:3708: $? = 1
configure:3728: checking whether the C compiler works
configure:3750: gcc conftest.c >&5
/usr/lib64/gcc/x86_64-solus-linux/8/cc1: error while loading shared libraries: libisl.so.19: cannot open shared object file: No such file or directory
configure:3754: $? = 1
configure:3792: result: no
configure: failed program was:
| /* confdefs.h /
| #define PACKAGE_NAME "libsodium"
| #define PACKAGE_TARNAME "libsodium"
| #define PACKAGE_VERSION "1.0.16"
| #define PACKAGE_STRING "libsodium 1.0.16"
| #define PACKAGE_BUGREPORT "https://github.com/jedisct1/libsodium/issues"
| #define PACKAGE_URL "https://github.com/jedisct1/libsodium"
| #define PACKAGE "libsodium"
| #define VERSION "1.0.16"
| /
end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3797: error: in /home/watchdog1/MEGAsync/src/MEGASync/mega/sdk_build/build/libsodium-1.0.16': configure:3799: error: C compiler cannot create executables See config.log' for more details

----------------

Cache variables.

----------------

ac_cv_build=x86_64-pc-linux-gnu
ac_cv_env_AR_set=
ac_cv_env_AR_value=
ac_cv_env_CCASFLAGS_set=
ac_cv_env_CCASFLAGS_value=
ac_cv_env_CCAS_set=
ac_cv_env_CCAS_value=
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CWFLAGS_set=
ac_cv_env_CWFLAGS_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_LT_SYS_LIBRARY_PATH_set=
ac_cv_env_LT_SYS_LIBRARY_PATH_value=
ac_cv_env_SAFECODE_HOME_set=
ac_cv_env_SAFECODE_HOME_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=x86_64-pc-linux-gnu
ac_cv_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/bin/mkdir
ac_cv_prog_AWK=gawk
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_make_make_set=yes
am_cv_make_support_nested_variables=yes
am_cv_prog_tar_ustar=gnutar

-----------------

Output variables.

-----------------

ACLOCAL='${SHELL} /home/watchdog1/MEGAsync/src/MEGASync/mega/sdk_build/build/libsodium-1.0.16/build-aux/missing aclocal-1.16'
ALLOCA=''
AMDEPBACKSLASH=''
AMDEP_FALSE='#'
AMDEP_TRUE=''
AMTAR='$${TAR-tar}'
AM_BACKSLASH=''
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
AM_DEFAULT_VERBOSITY='0'
AM_V='$(V)'
AR=''
AS=''
AUTOCONF='${SHELL} /home/watchdog1/MEGAsync/src/MEGASync/mega/sdk_build/build/libsodium-1.0.16/build-aux/missing autoconf'
AUTOHEADER='${SHELL} /home/watchdog1/MEGAsync/src/MEGASync/mega/sdk_build/build/libsodium-1.0.16/build-aux/missing autoheader'
AUTOMAKE='${SHELL} /home/watchdog1/MEGAsync/src/MEGASync/mega/sdk_build/build/libsodium-1.0.16/build-aux/missing automake-1.16'
AWK='gawk'
CC='gcc'
CCAS=''
CCASDEPMODE=''
CCASFLAGS=''
CCDEPMODE=''
CFLAGS=''
CFLAGS_AESNI=''
CFLAGS_AVX2=''
CFLAGS_AVX512F=''
CFLAGS_AVX=''
CFLAGS_MMX=''
CFLAGS_PCLMUL=''
CFLAGS_RDRAND=''
CFLAGS_SSE2=''
CFLAGS_SSE3=''
CFLAGS_SSE41=''
CFLAGS_SSSE3=''
CPP=''
CPPFLAGS=''
CWFLAGS=''
CYGPATH_W='echo'
DEFS=''
DEPDIR='.deps'
DLLTOOL=''
DLL_VERSION='8'
DSYMUTIL=''
DUMPBIN=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EMSCRIPTEN_FALSE=''
EMSCRIPTEN_TRUE=''
ENABLE_VALGRIND_drd=''
ENABLE_VALGRIND_helgrind=''
ENABLE_VALGRIND_memcheck=''
ENABLE_VALGRIND_sgcheck=''
EXEEXT=''
FGREP=''
GREP=''
HAVE_AMD64_ASM_FALSE=''
HAVE_AMD64_ASM_TRUE=''
HAVE_AMD64_ASM_V=''
HAVE_AVX_ASM_FALSE=''
HAVE_AVX_ASM_TRUE=''
HAVE_AVX_ASM_V=''
HAVE_CPUID_V=''
HAVE_LD_OUTPUT_DEF_FALSE=''
HAVE_LD_OUTPUT_DEF_TRUE=''
HAVE_TI_MODE_FALSE=''
HAVE_TI_MODE_TRUE=''
HAVE_TI_MODE_V=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
ISODATE='2019-08-31'
LD=''
LDFLAGS=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LIBTOOL_DEPS=''
LIBTOOL_EXTRA_FLAGS=''
LIPO=''
LN_S=''
LTLIBOBJS=''
LT_SYS_LIBRARY_PATH=''
MAINT='#'
MAINTAINER_MODE_FALSE=''
MAINTAINER_MODE_TRUE='#'
MAKEINFO='${SHELL} /home/watchdog1/MEGAsync/src/MEGASync/mega/sdk_build/build/libsodium-1.0.16/build-aux/missing makeinfo'
MANIFEST_TOOL=''
MINIMAL_FALSE=''
MINIMAL_TRUE=''
MKDIR_P='/bin/mkdir -p'
NATIVECLIENT_FALSE=''
NATIVECLIENT_TRUE=''
NM=''
NMEDIT=''
OBJDUMP=''
OBJEXT=''
OTOOL64=''
OTOOL=''
PACKAGE='libsodium'
PACKAGE_BUGREPORT='https://github.com/jedisct1/libsodium/issues'
PACKAGE_NAME='libsodium'
PACKAGE_STRING='libsodium 1.0.16'
PACKAGE_TARNAME='libsodium'
PACKAGE_URL='https://github.com/jedisct1/libsodium'
PACKAGE_VERSION='1.0.16'
PATH_SEPARATOR=':'
PTHREAD_CC=''
PTHREAD_CFLAGS=''
PTHREAD_LIBS=''
RANLIB=''
SAFECODE_HOME=''
SED=''
SET_MAKE=''
SHELL='/bin/sh'
SODIUM_LIBRARY_MINIMAL_DEF=''
SODIUM_LIBRARY_VERSION='24:0:1'
SODIUM_LIBRARY_VERSION_MAJOR='10'
SODIUM_LIBRARY_VERSION_MINOR='1'
STRIP=''
TEST_LDFLAGS=''
VALGRIND=''
VALGRIND_CHECK_RULES=''
VALGRIND_ENABLED=''
VALGRIND_ENABLED_FALSE=''
VALGRIND_ENABLED_TRUE=''
VERSION='1.0.16'
ac_ct_AR=''
ac_ct_CC='gcc'
ac_ct_DUMPBIN=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCCAS_FALSE=''
am__fastdepCCAS_TRUE=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__include='include'
am__isrc=''
am__leading_dot='.'
am__nodep='_no'
am__quote=''
am__tar='tar --format=ustar -chf - "$$tardir"'
am__untar='tar -xf -'
ax_pthread_config=''
bindir='${exec_prefix}/bin'
build='x86_64-pc-linux-gnu'
build_alias=''
build_cpu='x86_64'
build_os='linux-gnu'
build_vendor='pc'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host='x86_64-pc-linux-gnu'
host_alias=''
host_cpu='x86_64'
host_os='linux-gnu'
host_vendor='pc'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /home/watchdog1/MEGAsync/src/MEGASync/mega/sdk_build/build/libsodium-1.0.16/build-aux/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='$(MKDIR_P)'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/home/watchdog1/MEGAsync/src/MEGASync/mega/bindings/qt/3rdparty'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
valgrind_enabled_tools=''
valgrind_tools=''

-----------

confdefs.h.

-----------

/* confdefs.h */
#define PACKAGE_NAME "libsodium"
#define PACKAGE_TARNAME "libsodium"
#define PACKAGE_VERSION "1.0.16"
#define PACKAGE_STRING "libsodium 1.0.16"
#define PACKAGE_BUGREPORT "https://github.com/jedisct1/libsodium/issues"
#define PACKAGE_URL "https://github.com/jedisct1/libsodium"
#define PACKAGE "libsodium"
#define VERSION "1.0.16"

configure: exit 77"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment