After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 507141 - Problems building on Solaris
Problems building on Solaris
Status: RESOLVED DUPLICATE of bug 542136
Product: brasero
Classification: Applications
Component: general
unspecified
Other opensolaris
: Normal normal
: 0.7
Assigned To: Brasero maintainer(s)
Brasero maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2008-01-03 23:50 UTC by Brian Cameron
Modified: 2008-07-14 08:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch fixing some issues (4.09 KB, patch)
2008-01-03 23:51 UTC, Brian Cameron
committed Details | Review

Description Brian Cameron 2008-01-03 23:50:42 UTC
I tried building on Solaris and found a number of issues.  Some of which I was able to fix and am attaching a patch.  These issues include:

1) Shouldn't add GCC "-Wall" argument to CFLAGS.  If you want, you can check
   if you are using the GCC compiler in configure.ac and add it to CFLAGS there
   once.  This is better than adding it to all the Makefile.am files separately.

2) Sun Studio compiler doesn't like when static functions use inline functions
   that aren't also defined as inline.

The patch fixes these problems.

Problems I wasn't able to fix include:

1) src/scsi/scsi-command.c and src/scsi/scsi-sg.c include <scsi/scsi.h> and
   <scsi/sg.h>.  These aren't present on Solaris.  I notice Solaris has a
   /usr/include/sys/scsi/scsi.h, but no sg.h file.   However the Solaris 
   include file doesn't define sg_io_hdr...so not sure what to do here.

2) Many headers in the scsi directory define structures with a zero length
   member at the end.  Like this:

        uchar media_specific            [0];

   Sun Studio doesn't like this.  Not sure what to do about this either.

In short, I'm guessing there's a bunch of work to get brasero working on Solaris, but I wanted to share the fixes I made in my patch since I guess they could go upstream.
Comment 1 Brian Cameron 2008-01-03 23:51:07 UTC
Created attachment 102077 [details] [review]
patch fixing some issues
Comment 2 Luis Medinas 2008-01-10 00:44:03 UTC
Hi Brian

First of all Thanks for trying to get Brasero working on Solaris and sorry for the delay.
I commited all your patch to trunk and 0.7 branch except the static inline diff because i couldn't get it to compile fine with that option. From my understanding it should compile fine with gcc because it's just a simple change that shouldn't affect, it could be a bug on my gcc or something so i rather stay the code without your patch until we can find a way to get it compiling with gcc and sun studio.

The problems you have with the scsi library i got the same problem with the freebsd developers (they are working on a solution for it right now) because our library is based and works only with linux kernel.
So my opinion is that freebsd, solaris and linux should have different scsi library in the source.If the changes for solaris and freebsd aren't that big we can add some #defines to the current code.

Of course we are always open to patches and from distributors.
Thanks 
Comment 3 Philippe Rouquier 2008-01-19 20:05:34 UTC
In fact there is only one file to change, the one that uses the interface of linux kernel to send SCSI commands. All the rest can remain as is (minus the small compilation things you mentioned). In fact the problem here is that to send a SCSI command is different from one OS to another. So we just need one small file to allow brasero sending the SCSI commands he made. That shouldn't very hard for someone that knows his trade and OS.
Comment 4 Lin Ma 2008-07-10 03:36:52 UTC
Brian, I think Suncc v12 support "static functions use inline functions that aren't defined as inline". So I think we can ignore your last patch and close the bug.
Comment 5 Philippe Rouquier 2008-07-10 07:55:45 UTC
#542136 should now track all issues with solaris and brasero.
I'm making this bug a duplicate to keep it as a reminder.

*** This bug has been marked as a duplicate of 542136 ***
Comment 6 Brian Cameron 2008-07-14 08:52:39 UTC
Note I misspoke when I said "2) Sun Studio compiler doesn't like when static 
functions use inline functions that aren't also defined as inline."  

I should have said "Sun Studio compiler doesn't like when static functions use inline functionst hat aren't also defined as static".

It seems to me that simply defining the inline function also as static is an easy fix, and makes it possible for Solaris users with the older compiler (e.g. Solaris 10 users) build Brasero if they wish.  While not a high priority, since this issue is fixed in Sun Studio 12, it seems a harmless fix to make the code a bit more portable.