Re: [Solution/patch] Re: [Ifolder-dev] System.DllNotFoundException

2009-12-21 Thread BERTRAND Joël

Balakrishnan KalIdas a écrit :

This is really a great news and a milestone by itself to have iFolder on 
non-i386 OS.

  @JKB, is it possible to make a package out of it and post it as part of the 
downloads, so that we have people testing and fixing issues, so that we have a 
good build for sparc.


You can download my libflaim at

http://www.systella.fr/~bertrand/libflaim-4.9.989-sunv8plus.tar.bz2

	I have hardcoded -m32 in makefile to force 32 bits build. All other 
modifications in C sources are valid for both 32 and 64 bits on sparc 
servers. I don't known why I cannot use asmb atomic operations in 
V8PLUS. In fact, I can compile, but shared object is not relocatable due 
(offset too big for branch instruction).


	Simias and iFolder can be built with mono without great modifications. 
Simias looks for /usr/lib/libflaim.a that has to be changed in 
$(LIBFLAIM_PATH)/lib/libflaim.a. Some invocations of mcs have to be 
changed to gmcs to compile without error.


	I think that it is possible to use libflaim in 64 bits, but it requires 
a 64 bits mono runtime.


Regards,

JKB
___
ifolder-dev mailing list
ifolder-dev@forge.novell.com
http://forge.novell.com/mailman/listinfo/ifolder-dev


[Solution/patch] Re: [Ifolder-dev] System.DllNotFoundException

2009-12-17 Thread Balakrishnan KalIdas
This is really a great news and a milestone by itself to have iFolder on 
non-i386 OS.

 @JKB, is it possible to make a package out of it and post it as part of the 
downloads, so that we have people testing and fixing issues, so that we have a 
good build for sparc.

 Thanks Johnny for the help provided.

Kalis   

>>> On 12/17/2009 at 8:15 PM, in message <4b2a4402.5080...@systella.fr>, 
>>> BERTRAND
Joël wrote:
> Hello,
> 
>   Some news about iFolder on sparc linux (debian). Simias.exe looks for 
> FlaimWrapper.so in lib/usr/local/lib/simias/web/bin instead 
> /usr/local/lib/simias/web/bin, thus I have add a link like :
> www-d...@gershwin:/usr/local/lib/simias/web/bin$ ls -l lib
> lrwxrwxrwx 1 www-data www-data 1 déc.  17 12:14 lib -> /
> 
>   All libraries have to be built in 32 bits mode. To build libflaim, I 
> have modified main makefile to add -m32 -mv8plus to three lines as I 
> have written in my last post.
> 
>   With sparc32 target (even V8+), libflaim is broken due to asm atomics 
> (code is not relocatable due to a branch greater than 2**22). Thus you 
> have to replace #error line (line  1314 in ftk/src/ftkunix.cpp) by :
> 
> static pthread_mutex_t  mutex = PTHREAD_MUTEX_INITIALIZER;
> 
> int32_t sparc_atomic_add_32(volatile int32_t *mem, int32_t val)
> {
>  int32_t old_value;
>  pthread_mutex_lock(&mutex);
> 
>  old_value = *mem;
>  *mem += val;
> 
>  pthread_mutex_unlock(&mutex);
> 
>  return old_value;
> }
> 
> int32_t sparc_atomic_xchg_32(volatile int32_t *mem, int32_t val)
> {
>  int32_t prev;
>  pthread_mutex_lock(&mutex);
> 
>  prev = *mem;
>  *mem = val;
> 
>  pthread_mutex_unlock(&mutex);
> 
>  return prev;
> }
> 
> and iFolder runs !
> 
>   Regards,
> 
>   JKB
> ___
> ifolder-dev mailing list
> ifolder-dev@forge.novell.com 
> http://forge.novell.com/mailman/listinfo/ifolder-dev 
___
ifolder-dev mailing list
ifolder-dev@forge.novell.com
http://forge.novell.com/mailman/listinfo/ifolder-dev


Re: [Solution/patch] Re: [Ifolder-dev] System.DllNotFoundException

2009-12-17 Thread Ravi Kumar
Thats really good. Many were looking out for building server on Debain. I will 
post a link to this mail thread on community.ifolder.com 

Thanks johnny for helping JKB on this. 

ravi


>>> BERTRAND Joël 12/17/09 8:15 PM >>>
Hello,

Some news about iFolder on sparc linux (debian). Simias.exe looks for 
FlaimWrapper.so in lib/usr/local/lib/simias/web/bin instead 
/usr/local/lib/simias/web/bin, thus I have add a link like :
www-d...@gershwin:/usr/local/lib/simias/web/bin$ ls -l lib
lrwxrwxrwx 1 www-data www-data 1 déc.  17 12:14 lib -> /

All libraries have to be built in 32 bits mode. To build libflaim, I 
have modified main makefile to add -m32 -mv8plus to three lines as I 
have written in my last post.

With sparc32 target (even V8+), libflaim is broken due to asm atomics 
(code is not relocatable due to a branch greater than 2**22). Thus you 
have to replace #error line (line  1314 in ftk/src/ftkunix.cpp) by :

static pthread_mutex_t  mutex = PTHREAD_MUTEX_INITIALIZER;

int32_t sparc_atomic_add_32(volatile int32_t *mem, int32_t val)
{
 int32_t old_value;
 pthread_mutex_lock(&mutex);

 old_value = *mem;
 *mem += val;

 pthread_mutex_unlock(&mutex);

 return old_value;
}

int32_t sparc_atomic_xchg_32(volatile int32_t *mem, int32_t val)
{
 int32_t prev;
 pthread_mutex_lock(&mutex);

 prev = *mem;
 *mem = val;

 pthread_mutex_unlock(&mutex);

 return prev;
}

and iFolder runs !

Regards,

JKB
___
ifolder-dev mailing list
ifolder-dev@forge.novell.com
http://forge.novell.com/mailman/listinfo/ifolder-dev

___
ifolder-dev mailing list
ifolder-dev@forge.novell.com
http://forge.novell.com/mailman/listinfo/ifolder-dev

[Solution/patch] Re: [Ifolder-dev] System.DllNotFoundException

2009-12-17 Thread BERTRAND Joël

Hello,

	Some news about iFolder on sparc linux (debian). Simias.exe looks for 
FlaimWrapper.so in lib/usr/local/lib/simias/web/bin instead 
/usr/local/lib/simias/web/bin, thus I have add a link like :

www-d...@gershwin:/usr/local/lib/simias/web/bin$ ls -l lib
lrwxrwxrwx 1 www-data www-data 1 déc.  17 12:14 lib -> /

	All libraries have to be built in 32 bits mode. To build libflaim, I 
have modified main makefile to add -m32 -mv8plus to three lines as I 
have written in my last post.


	With sparc32 target (even V8+), libflaim is broken due to asm atomics 
(code is not relocatable due to a branch greater than 2**22). Thus you 
have to replace #error line (line  1314 in ftk/src/ftkunix.cpp) by :


static pthread_mutex_t  mutex = PTHREAD_MUTEX_INITIALIZER;

int32_t sparc_atomic_add_32(volatile int32_t *mem, int32_t val)
{
int32_t old_value;
pthread_mutex_lock(&mutex);

old_value = *mem;
*mem += val;

pthread_mutex_unlock(&mutex);

return old_value;
}

int32_t sparc_atomic_xchg_32(volatile int32_t *mem, int32_t val)
{
int32_t prev;
pthread_mutex_lock(&mutex);

prev = *mem;
*mem = val;

pthread_mutex_unlock(&mutex);

return prev;
}

and iFolder runs !

Regards,

JKB
___
ifolder-dev mailing list
ifolder-dev@forge.novell.com
http://forge.novell.com/mailman/listinfo/ifolder-dev