About porting MEGASync

Another problem with using rclone with the MEGA backend is that it fails to login if your MEGA password contains special characters.
Yeah and also doesn't work if you have 2FA, I think the culprit is go-mega library used.
 
Are you using USES=localbase?
I think no.
I tried to check the code again, this time with-lmediainfo. But the configure file returns that "configure: error: Could not find libmediainfo" despite mediainfo is installed and I can see the library files in /usr/local/lib. Tried to add LDFLAGS="-L/usr/local/lib" to the configure line but doesn't work. Any suggestion?

From the code, it relies on MediaInfo_Info_Version() to confirm the existence of libmediainfo
C++:
extern "C"
#endif
char MediaInfo_Info_Version ();
int
main ()
{
return MediaInfo_Info_Version ();
  ;
  return 0;
}

But I can confirm /usr/local/lib/libmediainfo.so contains MediaInfo_Info_Version ()
Code:
[pc ~/megasync3/MEGAsync/src/MEGASync/mega]$ nm -D /usr/local/lib/libmediainfo.so | grep MediaInfo_Info_Version
000000000072e520 T MediaInfo_Info_Version
Code:
[shuryanc@shuryanc-ghostbsd-pc ~/megasync3/MEGAsync/src/MEGASync/mega]$ ld -lmediainfo
ld: error: unable to find library -lmediainfo
[shuryanc@shuryanc-ghostbsd-pc ~/megasync3/MEGAsync/src/MEGASync/mega]$ ld -L/usr/lib -lmediainfo
ld: warning: cannot find entry symbol _start; not setting start address
 
I think no.
If you try to make a port of the thing, it'll do some fixes to you. USES=localbase will automatically point to /usr/local so the port will find the libraries instead of searching in /usr/lib or whatever place the developer decided it.
 
Last edited:
Code:
Reading symbols from megasync...
(gdb) run
Starting program: /usr/bin/megasync
[Detaching after fork from child process 3841]
[New LWP 355996 of process 3840]
[New LWP 355999 of process 3840]
[LWP 355996 of process 3840 exited]
[New LWP 356002 of process 3840]
[New LWP 356003 of process 3840]
[New LWP 356004 of process 3840]
[New LWP 356013 of process 3840]

Thread 1 received signal SIGSEGV, Segmentation fault.
Address not mapped to object.
0x0000000802acf9c5 in ?? () from /usr/local/lib/libcryptopp.so.8
Actually, this also happens on mega-cmd-server in megacmd package.
 
Last edited by a moderator:
With addition of `pkgconf --cflags-only-other libcryptopp` to CXXFLAGS, I got megasync ran and synced on FreeBSD
1644117927267.png
 
I need megaSYNC client badly. At the moment I have installed Arch inside Virtualbox with a shared folder from GUEST to HOST and and using megaSYNC installed under Arch to backup data to mega .
 
How far has gone with graphic Mega. I'm in the process of switching to Freebsd after 23 years with Linux. I have been using Mega on Linux for several years, and will miss it terribly in FreeBSD:'‑(
 
Last week I asked Mega Support a question.
The reply has just arrived, and in it they say:
Third-party tools are insecure and do not fully implement our cryptographic protocols, so we advise you not to use them.

... 'mega.py' is buggy.

Megatools ... is NOT safe to use as it doesn't do crypto correctly. It is not based on our official SDK, so it does not operate correctly in all circumstances (e.g. when shared folders are involved).

MEGAcmd (provided by and recommended by Mega Ltd) is not so big,
the commands are straightforward,
and it covers all MEGA features such as auto-sync and auto-backup.

Code:
# pkg install megacmd
...
New packages to be INSTALLED:
        c-ares: 1.18.1
        cryptopp: 8.6.0
        libsodium: 1.0.18
        libuv: 1.42.0
        megacmd: 1.5.0
        sqlite3: 3.39.2,1
...
The process will require 45 MiB more space.
8 MiB to be downloaded.

But it doesn't run for me --
mega-cmd-server gets "Segmentation fault".
 
Last edited:
Code:
Thread 1 received signal SIGSEGV, Segmentation fault.

Actually, this also happens on mega-cmd-server in megacmd package.

With addition of `pkgconf --cflags-only-other libcryptopp` to CXXFLAGS, I got megasync ran

Does the success above mean that it's ready to be port-able by someone?

And could it also be fixed in the megacmd pkg?

EDIT, UTC 22-10-06 03:20 :
Seems like megacmd 1.5.0_1 does not resolve this issue.
Have done a pkg upgrade which included
cryptopp: 8.6.0 -> 8.7.0
megacmd: 1.5.0 -> 1.5.0_1
and mega-cmd-server still gets Segmentation fault (core dumped).
 
Last edited:
And could it also be fixed in the megacmd pkg?

EDIT, UTC 22-10-06 03:20 :
Seems like megacmd 1.5.0_1 does not resolve this issue.
Have done a pkg upgrade which included
cryptopp: 8.6.0 -> 8.7.0
megacmd: 1.5.0 -> 1.5.0_1
and mega-cmd-server still gets Segmentation fault (core dumped).
I'm using a VM (Ubuntu server) using bhyve and sshfs for this issue. When I need sync my folders, run VM and mount my folders using SSHFS, and problem solved. It's a bazooka for a little problem, but work like a charm!
 
Back
Top