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 141319 - Epiphany compile issues on Solaris
Epiphany compile issues on Solaris
Status: RESOLVED INCOMPLETE
Product: epiphany
Classification: Core
Component: General
unspecified
Other opensolaris
: High normal
: ---
Assigned To: Epiphany Maintainers
Marco Pesenti Gritti
Depends on: 118563
Blocks:
 
 
Reported: 2004-04-28 19:49 UTC by Brian Cameron
Modified: 2007-08-03 13:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to make epiphany build on Solaris with Forte (2.34 KB, patch)
2004-04-28 19:50 UTC, Brian Cameron
needs-work Details | Review
workaround when mkdtemp is unavailable (686 bytes, patch)
2004-05-29 14:49 UTC, Christian Persch
none Details | Review
Patch to compile 1.2.6 on Solaris with Forte (8.32 KB, patch)
2004-06-15 07:38 UTC, Ivan Noris
none Details | Review

Description Brian Cameron 2004-04-28 19:49:31 UTC
The attached patch resolves some problems with compiling epiphany with
the Forte compiler.  Note that Forte complains about using "return" in
void functions, requires ISO style variable argument macros, and Solaris
doesn't have the mkdtemp function.
Comment 1 Brian Cameron 2004-04-28 19:50:46 UTC
Created attachment 27178 [details] [review]
patch to make epiphany build on Solaris with Forte
Comment 2 Christian Persch 2004-04-28 21:10:27 UTC
Comment on attachment 27178 [details] [review]
patch to make epiphany build on Solaris with Forte

>@@ -52,7 +52,13 @@
> 					    "-XXXXXX", NULL);
> 		full_name = g_build_filename (g_get_tmp_dir (), partial_name,
> 					      NULL);
>+#ifdef __SUNPRO_C
>+        mkstemp(full_name);
>+        tmp_dir = g_malloc(sizeof(char *)*strlen(full_name));
>+        strcpy(tmp_dir, full_name);
>+#else
> 		tmp_dir = mkdtemp (full_name);
>+#endif
> 		g_free (partial_name);
> 
> 		if (tmp_dir == NULL)

Instead of just checking for this compiler, I'd prefer a configure check for
mkstemp, and then #ifdef HAVE_MKSTEMP/#else here.

Also I don't get this line:
>+        tmp_dir = g_malloc(sizeof(char *)*strlen(full_name));
Shouldn't that be sizeof(char) * (strlen (full_name) + 1) ?

Apart from that, the patch looks good.
Comment 3 Christian Persch 2004-04-28 21:11:41 UTC
> Instead of just checking for this compiler, I'd prefer a configure check for
> mkstemp, and then #ifdef HAVE_MKSTEMP/#else here.

Sorry, I mean mkdtemp.
Comment 4 Christian Persch 2004-05-29 14:49:05 UTC
Created attachment 28151 [details] [review]
workaround when mkdtemp is unavailable

I've checked in all the bits from attachment 27178 [details] [review] and a configure check for
mkdtemp, except the implementation in the case of unavailable mkdtemp. Don't we
have to create the directory in this case, after getting a temp file_name_ ?
Comment 5 Christian Persch 2004-05-29 15:17:26 UTC
I had to revert the varargs change to ephy-debug.h, since it wouldn't compile
LOG("Test") messages (i.e. with no arguments).
Comment 6 Brian Cameron 2004-06-01 16:03:06 UTC
Right, to support ISO style varargs with only 1 parameter, something like this
would need to be done:

#define LOG(...)                            \
gchar *val = g_strdup_printf (__VA_ARGS__); \
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG,     \
       "[ %s ] %s",                         \
       __FILE__ , val);
g_free (val);
#endif

It is a little annoying to have to allocate/free, but this might not matter
if this is only used for debug purposes.  Also you could set up the
if-def's so that it only uses ISO standard if GNU style vararg macro is not 
available by the compiler.  Other alternatives would be to eliminate the
__FILE__ from appearing in the g_log message or printing two g_log messages
(one with the file and the second with the message).
Comment 7 Ivan Noris 2004-06-15 07:35:49 UTC
I have used some of these patches. For 1.2.6 I've had to use following patch and
CFLAGS += -DHAVE_MKDTEMP
CPPFLAGS += -DHAVE_MKDTEMP

before compilation (this was in Makefile from GARNOME).

because there is some test for MKDTEMP, which does not work on Solaris.
Please check that patch. It compiles with epi 1.2.6 on Solaris 9/SPARC with Forte.
Comment 8 Ivan Noris 2004-06-15 07:38:06 UTC
Created attachment 28711 [details] [review]
Patch to compile 1.2.6 on Solaris with Forte

Please review this patch, as some things may not be what they should be like.
Comment 9 Christian Persch 2004-10-13 10:52:34 UTC
Mass reassigning of Epiphany bugs to epiphany-maint@b.g.o
Comment 10 Christian Persch 2005-03-02 22:11:55 UTC
Comment on attachment 28711 [details] [review]
Patch to compile 1.2.6 on Solaris with Forte

I don't want to have to maintain a copy of mkdtemp in epiphany; it should just
be available from glib (bug 118563).

The LOG macro varargs problem is fixed in current code.
Comment 11 Christian Persch 2007-05-31 12:42:49 UTC
Do any of these issues still exist in epiphany 2.18.2 ?
Comment 12 Reinout van Schouwen 2007-08-03 13:34:32 UTC
Ivan: ping?
Comment 13 Ivan Noris 2007-08-03 13:52:27 UTC
Sorry, I don't try to compile Epiphany on Sol since I've reported the problem.