maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   LDAP development for Sailfish OS (https://talk.maemo.org/showthread.php?t=99421)

pexi 2017-05-31 12:39

LDAP development for Sailfish OS
 
I've done QT code snipplets to Linux with openldap development libraries but I think they are not available for SFOS? Do you have any suggestions on what libraries to use in order to develop LDAP applications for SFOS?

I'd hate to implement the protocol as it is done in available libraries but I have zero experience in porting libraries to another platform.

edit: only now found the openldap library from openrepos so now it looks a bit better! I think this should enable me to do a package to openrepos or try doing it static?

nieldk 2017-05-31 12:54

Re: LDAP development for Sailfish OS
 
Openldap is in my repository

https://build.merproject.org/package...elsen/openldap

nieldk 2017-05-31 13:07

Re: LDAP development for Sailfish OS
 
Quote:

Originally Posted by pexi (Post 1528618)
I've done QT code snipplets to Linux with openldap development libraries but I think they are not available for SFOS? Do you have any suggestions on what libraries to use in order to develop LDAP applications for SFOS?

I'd hate to implement the protocol as it is done in available libraries but I have zero experience in porting libraries to another platform.

edit: only now found the openldap library from openrepos so now it looks a bit better! I think this should enable me to do a package to openrepos or try doing it static?

Copy from my repository, to yours is perhaps easiest.

pexi 2017-05-31 14:14

Re: LDAP development for Sailfish OS
 
Quote:

Originally Posted by nieldk (Post 1528621)
Copy from my repository, to yours is perhaps easiest.

Thanks. I try to unpack and use your package.

As another choice I compiled a 32bit static ELF binary in 64 bit linux but SFOS could not run it. Is it doable?

Edit: how stupid of me. It is arm processor :) Forget this question :)

pexi 2017-06-01 14:33

Re: LDAP development for Sailfish OS
 
Could you help me out a bit.

I made a helloworld project with SFOS Qt Creator and I did the following:

- i extracted files from libopenldap-devel-2.4.40-10.7.2.jolla.armv7hl.rpm
- copied files lib*.a and lib*.la from libopenldap-devel to lib directory under the helloworld qt project
- copied files *.h from libopenldap-devel to include directory under the dummy qt project

I added to project .pro file:
INCLUDEPATH += include
DEPENDPATH += include
LIBS += -Llib -llber -lldap

I added to the project cpp file:
#include <ldap.h>
#include <lber.h>

and in the main {} i added:

LDAP *ldap;

And compile gives me:

g++ -Wl,-O1 -Wl,-rpath,/usr/share/HelloWorld/lib -o HelloWorld HelloWorld.o -Llib -llber -lldap -pie -rdynamic -lsailfishapp -lmdeclarativecache5 -lQt5Quick -lQt5Gui -lQt5Qml -lQt5Network -lQt5Core -lGLESv2 -lpthread

RPM build errors:
/opt/cross/bin/armv7hl-meego-linux-gnueabi-ld: cannot find -llber
/opt/cross/bin/armv7hl-meego-linux-gnueabi-ld: cannot find -lldap
collect2: error: ld returned 1 exit status

That g++ command line does not look like there's any includes to my lib and include subdirectories. Any help appreciated.

pexi 2017-06-01 14:47

Re: LDAP development for Sailfish OS
 
Is the emulator i486 only?

pexi 2017-06-02 10:15

Re: LDAP development for Sailfish OS
 
Got it to deploy to my Nexus 5 Sailfish :) Sailing continues..

pexi 2017-06-08 09:45

Re: LDAP development for Sailfish OS
 
I included original source trees of openldap, cyrus-sasl and openssl and now it's going forward.


All times are GMT. The time now is 05:45.

vBulletin® Version 3.8.8