Giter Site home page Giter Site logo

MeshAgent old glibc about meshagent HOT 29 CLOSED

ylianst avatar ylianst commented on June 16, 2024
MeshAgent old glibc

from meshagent.

Comments (29)

krayon007 avatar krayon007 commented on June 16, 2024

I'll have to build a CentOS 5.11 image, as the oldest machine I have is Ubuntu 9, which appears to still have a newer libc than you...

In the meantime, it should be easy to compile yourself. Tho you'll need to compile openssl and turbo-jpeg. The instructions for doing that, is in the makefile. I'll try to build the image tonight, and see if I can post a link here tomorrow...

from meshagent.

krayon007 avatar krayon007 commented on June 16, 2024

32 bit?

from meshagent.

krayon007 avatar krayon007 commented on June 16, 2024

This might take a while. CentOS 5.11 is very old, so I'm having a very hard time compiling this for you, because all the tools are out of date. I can't connect to any websites, because openssl is extremely old. In order to compile a newer OpenSSL, I need to also recompile Perl, the current OpenSSL requires a newer Perl. Likewise, GIT doesn't work, because GIT can't connect to any repos because OpenSSL is too old. I finally got OpenSSL, Perl, and GIT compiled, but now it's complaining that CURL is too old. But while trying to get that to work, I broke the package manager, because apparently YUM doesn't work with newer OpenSSL, so now I have to start all over again, because I didn't create a snapshot....

from meshagent.

pczolee avatar pczolee commented on June 16, 2024

Thank you very much for your helping. Yes this is a very old system, but this is in production so there is no way to update. It is 32bit. If i can help anything let me know. If you can give me the complied libs (what you made and i need to complie it), than i can make regular update when a new version is coming (maybe there are some other people who need it).

from meshagent.

krayon007 avatar krayon007 commented on June 16, 2024

I got the agent compiled on CentOS 5.11, just trying to figure out why KVM isn't working. It works on CentOS 6 but not 5.11 for some reason...

I pushed into git the OpenSSL and turbojpeg libraries I compiled. I also updated the makefile, because apparently the GCC on CentOS 5.11 doesnt understand one of the flags I was using, So I added a LEGACY_LD build flag.

I'll post something here later today, so you can test it out. I noticed /sbin isn't on the path for CentOS 5.11 too, so I had to tweak how I was finding libraries, but I didn't check that in yet.

from meshagent.

krayon007 avatar krayon007 commented on June 16, 2024

Ok, I got it all working on CentOS 5.11, including KVM...

You'll either need to drop the binary into your server, or you need to disable auto-update on the client side, otherwise when you start it, it will most likely auto-update to the version on the server, which won't work on CentOS 5.11.

Link to binary

from meshagent.

krayon007 avatar krayon007 commented on June 16, 2024

By the way, everything is checked into GIT, so if you pull the agent repo, and you needed to build on CentOS 5.11 32 bit, you can do:

make linux ARCHID=5 FSWATCH_DISABLE=1 LEGACY_LD=1

The machine you are compiling on needs the dev headers installed for X and jpeg:
sudo yum install libX11-devel libXtst-devel libXext-devel libjpeg-devel

from meshagent.

pczolee avatar pczolee commented on June 16, 2024

This is fantastic! You are a genius! Thank you so much for you hard work.

God bless you!

from meshagent.

pczolee avatar pczolee commented on June 16, 2024

Is someone else need I found how to disable auto update (in the issue #4):

./meshagent_x86-64 modules/dbTool.js put disableUpdate=1
to turn off updates and
./meshagent_x86-64 modules/dbTool.js delete disableUpdate
to turn it back on.

from meshagent.

krayon007 avatar krayon007 commented on June 16, 2024

You can also edit the .msh file and put:
disableUpdate=1
In the last line.

To reenable, put:
disableUpdate=

In it instead.

from meshagent.

krayon007 avatar krayon007 commented on June 16, 2024

I noticed that user-consent and notifications aren't working on CentOS 5.11, so I'll take a look at that when I get back in the office. Looks like I'll be able to get the consent-dialog working, but the notification doesn't seem to work with the built in utility.

from meshagent.

krayon007 avatar krayon007 commented on June 16, 2024

If you repull the binary from the link above (or do another pull on the repo), user-consent and notifications will work correctly on CentOS 5.11

from meshagent.

pczolee avatar pczolee commented on June 16, 2024

Thank you. I'll update it now.

from meshagent.

krayon007 avatar krayon007 commented on June 16, 2024

Make sure you add /sbin to your path. CentOS 5 doesn't add that by default. A bunch of stuff doesn't work if that isn't set...

from meshagent.

krayon007 avatar krayon007 commented on June 16, 2024

I'm modifying the code to be able to auto add that if it's not set for the agent process.

from meshagent.

pczolee avatar pczolee commented on June 16, 2024

Thank you so much!

from meshagent.

pczolee avatar pczolee commented on June 16, 2024

I tried now to build in raspbian 7.11, which is pretty old (this is an rpi1), it have glibc 2.13, kernel 4.19.66. Installed what is in the makefile, but cannot build, here is the error:

Duktape_WritableStream.o microscript/ILibDuktapeModSearch.o microscript/ILibDuktape_WebRTC.o microscript/ILibDuktape_SimpleDataStore.o microscript/ILibDuktape_GenericMarshal.o microscript/ILibDuktape_fs.o microscript/ILibDuktape_SHA256.o microscript/ILibduktape_EventEmitter.o microscript/ILibDuktape_EncryptionStream.o microscript/ILibDuktape_Polyfills.o microscript/ILibDuktape_Dgram.o microscript/ILibDuktape_ScriptContainer.o microscript/ILibDuktape_MemoryStream.o microscript/ILibDuktape_NetworkMonitor.o microscript/ILibDuktape_ChildProcess.o microscript/ILibDuktape_HECI.o microscript/ILibDuktape_HttpStream.o microscript/ILibDuktape_Debugger.o meshcore/KVM/Linux/linux_kvm.o meshcore/KVM/Linux/linux_events.o meshcore/KVM/Linux/linux_tile.o meshcore/KVM/Linux/linux_compression.o meshcore/agentcore.o meshconsole/main.o meshcore/meshinfo.o -Lopenssl/libstatic/linux/armhf -l:lib-jpeg-turbo/linux/armhf/libturbojpeg.a -L. -lpthread -ldl -lutil -lm -lssl -lcrypto -lrt -o meshagent_armhf
openssl/libstatic/linux/armhf/libcrypto.a(uid.o): In function OPENSSL_issetugid': uid.c:(.text+0x8): undefined reference to getauxval'
collect2: ld returned 1 exit status
make[1]: *** [meshagent_armhf] Error 1
make[1]: Leaving directory `/root/temp/MeshAgent-master'
make: *** [linux] Error 2

How to solve this?
Thanks

from meshagent.

krayon007 avatar krayon007 commented on June 16, 2024

Did you compile OpenSSL? The auxval error, if I remember happens when you try to statically link OpenSSL that was compiled with newer libc, because auxval was defined in libc version it was compiled with, but it doesn't exist on the libc you are using.

from meshagent.

pczolee avatar pczolee commented on June 16, 2024

No, I didn't, I'll try to do it first. Anyway I found that the "meshagent_armhf2" binary working fine with old glibc.
And (one more information ;) ) I built it successful in Centos 5.11!

Thanks a lot

from meshagent.

pczolee avatar pczolee commented on June 16, 2024

Hi @krayon007
I tried to build the actual version, but in won't work :(

shinfo.o -Lopenssl/libstatic/linux/x86 lib-jpeg-turbo/linux/x86/libturbojpeg.a -L. -lpthread -ldl -lutil -lm -no-pie -lssl -lcrypto -lrt -z noexecstack -z relro -z now -o meshagent_x86
gcc: unrecognized option '-no-pie'
openssl/libstatic/linux/x86/libcrypto.a(v3_utl.o): In function ipv6_cb': v3_utl.c:(.text+0x2f0): undefined reference to __isoc99_sscanf'
openssl/libstatic/linux/x86/libcrypto.a(v3_utl.o): In function a2i_ipadd': v3_utl.c:(.text+0x240e): undefined reference to __isoc99_sscanf'
collect2: ld returned 1 exit status
make[1]: *** [meshagent_x86] Error 1
make[1]: Leaving directory `/home/Mesh/MeshAgent-master'
make: *** [linux] Error 2

Can you help me, why? Centos 5.11 32bit

Thanks

from meshagent.

krayon007 avatar krayon007 commented on June 16, 2024

I recompiled the 32 bit x86 linux openssl .a files on CentOS 5.11, so it should work for you now, if you repull the tip and recompile. When it was updated to 1.1.1g, my CentOS 5.11 version was overwritten with a build from a newer libc.

from meshagent.

pczolee avatar pczolee commented on June 16, 2024

I recompiled the 32 bit x86 linux openssl .a files on CentOS 5.11, so it should work for you now, if you repull the tip and recompile. When it was updated to 1.1.1g, my CentOS 5.11 version was overwritten with a build from a newer libc.

Thank you very much. Now built successfully ;)

from meshagent.

knkumar93 avatar knkumar93 commented on June 16, 2024

Hi @krayon007,

I am following above mentioned points to compile mesh agent in CentOS 5.11 but getting below error. Your advice would be helpful to proceed further.

/opt/meshagent/MeshAgent-MeshCentral_v0.7.65/microstack/ILibParsers.h:329: undefined reference to `__sync_bool_compare_and_swap_4'

Detailed error: compile-error.txt

Tried with latest version (1.0.75) also but getting same error.

from meshagent.

krayon007 avatar krayon007 commented on June 16, 2024

I have a cent is 5.11 system. Are you running 32 bit or 64 bit? I know I had to compile openssl using CentOS/5.11 because the glibc in it is older than the Ubuntu 10 system that ylian uses to build most of the agents. I usually manually check in the 5.11 openssl library if it gets overwritten when we check in openssl updates. My CentOS/5.11 is 32 bit. I'll check to see what openssl is checked in GIT. If you need a 64 bit version, I'll send you the library. I know the glibc in 5.11 is missing some of the thread synchronization primitives that we wrote workarounds for, so that's why I didnt usually build a 64 bit version.

from meshagent.

knkumar93 avatar knkumar93 commented on June 16, 2024

Hi @krayon007,

My build machine is CentOS 5.11 64bit machine. But I am trying to build 32bit binary using ARCHID=5 option. But getting the mentioned error.

from meshagent.

krayon007 avatar krayon007 commented on June 16, 2024

For CentOS/5.11 you also need to set the following flags when building:

make linux ARCHID=5 FSWATCH_DISABLE=1 LEGACY_LD=1

from meshagent.

knkumar93 avatar knkumar93 commented on June 16, 2024

Hi @krayon007.

Thanks with above command I am able to build, however I am getting segmentation fault error, when I try to run it. Below steps done.

Placed built meshagent_x86 inside node_modules\MeshCentral\agents folder
Downloaded Linux X86-32 version of binary installer from mesh portal.
Placed in linux machine (same CentOS 5.11)
and then
chmod +x ./meshagent
then, launched it with
./meshagent
Getting segmentation fault error.

from meshagent.

krayon007 avatar krayon007 commented on June 16, 2024

Does the following work, after you download said binary installer?
./meshagent -help
./meshagent -connect

from meshagent.

knkumar93 avatar knkumar93 commented on June 16, 2024

Hi @krayon007 ,

Please ignore my previous reply. I was confused with different Ubuntu machine build.

In Cent OS 5.11 by using option which you suggested, I was still getting same error which I mentioned earlier.

/opt/meshagent/MeshAgent-MeshCentral_v0.7.65/microstack/ILibParsers.h:329: undefined reference to '__sync_bool_compare_and_swap_4'

Later did some research and found a suggestion here. Tried passing additional option -march=i686 in makefile in line number 284, then the compilation got succeeded. I can use this to run in CentOS 5.11, RHEL 5.9 machine. I can also run same in Ubuntu 16.04 machine.

CC = gcc -m32 -march=i686

Now I am Able to access terminal, file transfer, but Desktop tab is not appearing.

running 'info' command in console tab gives below exception.

> info
Command returned an exception error: (null)

from meshagent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.