Coder Social home page Coder Social logo

Compile on Solaris? about redis HOT 16 CLOSED

lachim avatar lachim commented on May 22, 2024
Compile on Solaris?

from redis.

Comments (16)

GoogleCodeExporter avatar GoogleCodeExporter commented on May 22, 2024
Hello, I think you need something like -ldl -lnsl -lresolve and so on.
In SunOS this libs are not in the libc that is automatically linked against the
executable, so you need to specify this libs. Not an expert of Sun OS but hope 
this
helps.

Original comment by [email protected] on 18 Mar 2009 at 8:13

from redis.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 22, 2024
Leaving this issue open for other people reaching this page with the same 
Solaris
problem until we don't have documentation or different make targets

Original comment by [email protected] on 2 Apr 2009 at 7:58

from redis.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 22, 2024
[deleted comment]

from redis.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 22, 2024
Compiling with this command: 

CC=/usr/sfw/bin/gcc CFLAGS="-pedantic -O2 -Wall -W -DSDS_ABORT_ON_OOM -ldl 
-lnsl -lsocket" gmake

Seems to work after the fix noted in issue 27. Compiling complains quite a bit 
though.

Also I'm getting a background saving error when running through tests. Speaking 
of tests Solaris fails when you 
run the test, so I'm running it from my OS X workstation.

Original comment by [email protected] on 18 Apr 2009 at 8:41

from redis.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 22, 2024
See 
http://github.com/unilogic/redis/commit/bc18c02f958a45f868d345bd5afdb3893c874ca4
 for further 
patches regarding Solaris.

Original comment by [email protected] on 19 Apr 2009 at 1:56

from redis.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 22, 2024
Tried to compile with 0.100 and hit some new problems.
First with pqsort, which has just been fixed by antirez (get latest from 
github).

Then pqsort.c still didn't compile, as "sys/cdefs.h" was not found on Solaris 
10.  I
just commented that include and then everything compiled (using unilogic's 
patches too).

But at startup redis-server core dumped:
signal BUS (invalid address alignment) in aeCreateEventLoop at line 49 in file 
"ae.c"
    49 eventLoop->timeEventNextId = 0;

I changed all "long long" to just "long" in ae.h and ae.c, and now redis-server
starts up without crashing.. don't know what the right solution is though.

Original comment by [email protected] on 28 May 2009 at 5:10

from redis.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 22, 2024
Tried the tests (found that they require tcl 8.4.. maybe mention that 
somewhere)..
several passed, then another crash:
signal BUS (invalid address alignment) in sortCommand at line 3451 in file 
"redis.c"
 3451                       vector[j].u.score = strtod(byval->ptr,NULL);

I changed the "double score" in redisSortObject to a float, and changed a couple
strtod calls to strtof.  Now all the tests pass.
(again, don't know what the "right" fix is... just reporting the problems I hit 
and
workarounds I found!)

Original comment by [email protected] on 28 May 2009 at 5:29

from redis.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 22, 2024
I worked on better fixes for compilation and word alignment problems:
http://github.com/alanharder/redis/commit/25091fb1996e3a18badb0e4a20fdeb4814d9f7
be
http://github.com/alanharder/redis/commit/f00df40f25c6e5d64d79357691a2c1afc9910b
5a

I submitted a "pull request" on github too (hopefully did it right).

Original comment by [email protected] on 11 Aug 2009 at 10:07

from redis.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 22, 2024
Salvatore, any chance we can get these fixes integrated? Solaris support is 
important
for us as we are a Solaris only shop.

Original comment by [email protected] on 28 Sep 2009 at 3:28

from redis.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 22, 2024
I'm in the process of reviewing the patch in order to make sure it will not 
break any
other port. Thanks for submitting.

Original comment by [email protected] on 23 Oct 2009 at 12:43

from redis.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 22, 2024

Original comment by [email protected] on 23 Oct 2009 at 12:45

  • Changed state: Accepted

from redis.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 22, 2024
Ok I reviewed this two patches:

http://github.com/alanharder/redis/commit/25091fb1996e3a18badb0e4a20fdeb48
14d9f7be
http://github.com/alanharder/redis/commit/f00df40f25c6e5d64d79357691a2c1afc
9910b5a

If this are all the changes needed I'll merge in five minutes. Just can try it 
myself as 
I've not accesso to Solaris. For the future in order to support Solaris better, 
if 
somebody may provide me with an ssh account in a Solaris box it will be really 
helpful.

Original comment by [email protected] on 26 Oct 2009 at 9:50

from redis.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 22, 2024
Ok patches merged. Thanks. Can you please verify the latest Redis from git is 
able to 
compile without issues on Solaris and passes the tests? Thanks.

Original comment by [email protected] on 26 Oct 2009 at 3:26

  • Changed state: Fixed

from redis.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 22, 2024
The fixes for issue with redis 1.001 look good.  Since then, one new issue.  
See:
http://lists.fourthought.com/pipermail/4suite/2005-August/007406.html
and the pages it links to:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19933
http://gcc.gnu.org/ml/gcc-patches/2005-05/msg02123.html

Ick, Solaris with isnan/isinf is not pretty.
I did get current git HEAD to compile and all tests pass by adding this to 
redis.c
just after include of <math.h>:

#if defined(__sun) && defined(__GNUC__)
#undef isnan
#define isnan(x) \
      __extension__({ __typeof (x) __x_a = (x); \
      __builtin_expect(__x_a != __x_a, 0); })

#undef isfinite
#define isfinite(x) \
      __extension__ ({ __typeof (x) __x_f = (x); \
      __builtin_expect(!isnan(__x_f - __x_f), 1); })

#undef isinf
#define isinf(x) \
      __extension__ ({ __typeof (x) __x_i = (x); \
      __builtin_expect(!isnan(__x_i) && !isfinite(__x_i), 0); })
#endif

Original comment by [email protected] on 27 Oct 2009 at 5:06

from redis.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 22, 2024
Just pushed a fix for this, can you please try if it's working? Thanks.

p.s. now there is a solarisfixes.h where we can put this kind of fixes.

Original comment by [email protected] on 27 Oct 2009 at 5:40

from redis.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 22, 2024
Current git compiles fine and all tests pass, thanks!

Original comment by [email protected] on 29 Oct 2009 at 5:35

from redis.

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.