You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "D. J. Hagberg" <dj...@sun.com> on 2002/09/12 19:53:49 UTC

svn on Solaris

I'm working on trying to get a subversion client and server running on 
Solaris.  Has anyone been able to do this yet?

I'm able to download the most recent snapshot and get it compiled 
statically just fine, using gcc 2.95.3.  Works fine for checking out the 
subversion source, even across a socks proxy.

However, compiling the server & apache & all the other things it needs 
with gcc 2.95.3 produces some linking problems, like a missing 
__floatdisf symbol.  Seems to be a gcc problem.

So then I try and compile the whole shebang with the SunPro cc compiler. 
  It works OK except a couple source files try to do struct assignments 
rather than struct* assignments.  SunPro cc doesn't like this so the 
attached patch is required.  Then I can get apache, subversion, et. al. 
compiled.

However, when I try to run this client, I cannot even get it to show its 
help:

     /usr/local/svn/bin/svn --help
--> Type `svn help' for help on Subversion usage.

Nor do any other commands work.

I /was/ able to use svnadmin to create a repository.

In the Apache server, the mod_dav_svn.so seems to load OK but doesn't 
seem to process responses correctly.  Using the svn client built 
statically from the snapshot, I get a very odd response:

     svn mkdir -m test http://localhost:9080/repos/projname/
     subversion/libsvn_ra_dav/util.c:163: (apr_err=61013, src_err=0)
     svn: Unknown resolver error
     svn:
     file not found: transaction `4', path `/projname'

Should I just wait for the next snapshot which is supposed to come out 
later today?

Is compiling with a compiler other than gcc just asking for trouble (and 
should I be using gcc 3.x)?

Will subversion build OK against the released Apache 2.0.40 and its 
associated apr and apr-util libs?

Sorry for all the questions,

			-=- D. J.

Re: [PATCH] compile fs-test.c with non-gcc compiler

Posted by Justin Erenkrantz <je...@apache.org>.
On Thu, Sep 12, 2002 at 11:59:35PM +0100, Philip Martin wrote:
> "D. J. Hagberg" <dh...@central.sun.com> writes:
> 
> > Index: subversion/tests/libsvn_fs/fs-test.c
> > ===================================================================
> > --- subversion/tests/libsvn_fs/fs-test.c
> > +++ subversion/tests/libsvn_fs/fs-test.c	Mon Sep  9 13:38:01 2002
> > @@ -5167,18 +5167,18 @@
> >        {
> >          for (j = 0; j < 16; j++)
> >            {
> > -            struct path_rev_t pr1 = path_revs[i];
> > -            struct path_rev_t pr2 = path_revs[j];
> > +            struct path_rev_t *pr1 = &(path_revs[i]);
> > +            struct path_rev_t *pr2 = &(path_revs[j]);
> 
> Out of interest, does using const
> 
> > +            const struct path_rev_t pr1 = path_revs[i];
> > +            const struct path_rev_t pr2 = path_revs[j];
> 
> work?

Nope.

What does work is removing the const from the rev field in
path_rev_t.  I'll commit that and if anyone has anything better,
let me know first and I'll try it out with forte.  It doesn't
seem to produce a warning with gcc (on Darwin), and it's a much
easier solution than D.J.'s original suggestion.

For more on non-modifiable lvalues:

http://www.embedded.com/story/OEG20010618S0075

Based on my reading of that, it seems that forte *is* correct on
producing this warning.  But, I could be wrong and we need to submit
a bug report to Sun.

Non-compilable code is a sure way to make me not happy.  -- justin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] compile fs-test.c with non-gcc compiler

Posted by Philip Martin <ph...@codematters.co.uk>.
"D. J. Hagberg" <dh...@central.sun.com> writes:

> Index: subversion/tests/libsvn_fs/fs-test.c
> ===================================================================
> --- subversion/tests/libsvn_fs/fs-test.c
> +++ subversion/tests/libsvn_fs/fs-test.c	Mon Sep  9 13:38:01 2002
> @@ -5167,18 +5167,18 @@
>        {
>          for (j = 0; j < 16; j++)
>            {
> -            struct path_rev_t pr1 = path_revs[i];
> -            struct path_rev_t pr2 = path_revs[j];
> +            struct path_rev_t *pr1 = &(path_revs[i]);
> +            struct path_rev_t *pr2 = &(path_revs[j]);

Out of interest, does using const

> +            const struct path_rev_t pr1 = path_revs[i];
> +            const struct path_rev_t pr2 = path_revs[j];

work?

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] compile fs-test.c with non-gcc compiler

Posted by Branko Čibej <br...@xbc.nu>.
D. J. Hagberg wrote:

>* fs-test.c
>  (check_related) File failed compilation with Sun/Forte cc compiler 
>  due to struct assignment.  This fix changes pr1 and pr2 to be
>  assigned as pointers and dereferenced as pointers.  SunPro cc 
>  doesn't seem to follow the convention of bitwise copies of 
>  structs on assignments.
>
It's not a convention, it's a standard feature of ISO C. Witness that 
even HP's notoriously quirky C complier handles that code without 
complaints.

Are you sure there are no optiions that would modify the behaviour of 
Sun's cc to accept that code?

-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

[PATCH] compile fs-test.c with non-gcc compiler

Posted by "D. J. Hagberg" <dh...@central.sun.com>.
* fs-test.c
  (check_related) File failed compilation with Sun/Forte cc compiler 
  due to struct assignment.  This fix changes pr1 and pr2 to be
  assigned as pointers and dereferenced as pointers.  SunPro cc 
  doesn't seem to follow the convention of bitwise copies of 
  structs on assignments.  The exact error message is:
"subversion/tests/libsvn_fs/fs-test.c", line 5170: left operand must be modifiable lvalue: op "="
"subversion/tests/libsvn_fs/fs-test.c", line 5171: left operand must be modifiable lvalue: op "="
cc: acomp failed for subversion/tests/libsvn_fs/fs-test.c
make: *** [subversion/tests/libsvn_fs/fs-test.o] Error 2


Index: subversion/tests/libsvn_fs/fs-test.c
===================================================================
--- subversion/tests/libsvn_fs/fs-test.c
+++ subversion/tests/libsvn_fs/fs-test.c	Mon Sep  9 13:38:01 2002
@@ -5167,18 +5167,18 @@
       {
         for (j = 0; j < 16; j++)
           {
-            struct path_rev_t pr1 = path_revs[i];
-            struct path_rev_t pr2 = path_revs[j];
+            struct path_rev_t *pr1 = &(path_revs[i]);
+            struct path_rev_t *pr2 = &(path_revs[j]);
             const svn_fs_id_t *id1, *id2;
             int related = 0;
 
             /* Get the ID for the first path/revision combination. */
-            SVN_ERR (svn_fs_revision_root (&rev_root, fs, pr1.rev, pool));
-            SVN_ERR (svn_fs_node_id (&id1, rev_root, pr1.path, pool));
+            SVN_ERR (svn_fs_revision_root (&rev_root, fs, pr1->rev, pool));
+            SVN_ERR (svn_fs_node_id (&id1, rev_root, pr1->path, pool));
           
             /* Get the ID for the second path/revision combination. */
-            SVN_ERR (svn_fs_revision_root (&rev_root, fs, pr2.rev, pool));
-            SVN_ERR (svn_fs_node_id (&id2, rev_root, pr2.path, pool));
+            SVN_ERR (svn_fs_revision_root (&rev_root, fs, pr2->rev, pool));
+            SVN_ERR (svn_fs_node_id (&id2, rev_root, pr2->path, pool));
             
             /* <exciting> Now, run the relationship check! </exciting> */
             related = svn_fs_check_related (id1, id2);
@@ -5191,14 +5191,14 @@
                 return svn_error_createf
                   (SVN_ERR_TEST_FAILED, 0, NULL, pool,
                    "expected `%s:%d' to be related to `%s:%d'; it was not",
-                   pr1.path, (int)pr1.rev, pr2.path, (int)pr2.rev);
+                   pr1->path, (int)pr1->rev, pr2->path, (int)pr2->rev);
               }
             else if ((! related) && related_matrix[i][j])
               {
                 return svn_error_createf
                   (SVN_ERR_TEST_FAILED, 0, NULL, pool,
                    "expected `%s:%d' to not be related to `%s:%d'; it was",
-                   pr1.path, (int)pr1.rev, pr2.path, (int)pr2.rev);
+                   pr1->path, (int)pr1->rev, pr2->path, (int)pr2->rev);
               }
 
             svn_pool_clear (subpool);


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn on Solaris

Posted by Justin Erenkrantz <je...@apache.org>.
On Thu, Sep 12, 2002 at 01:53:49PM -0600, D. J. Hagberg wrote:
> So then I try and compile the whole shebang with the SunPro cc compiler. 
>  It works OK except a couple source files try to do struct assignments 
> rather than struct* assignments.  SunPro cc doesn't like this so the 
> attached patch is required.  Then I can get apache, subversion, et. al. 
> compiled.

Can you please read HACKING as to how to submit patches?

FWIW, I'll probably be compiling SVN with Forte in the next few
days, so I'll review any patches you have....  -- justin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org