bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gnulib] bug in dummy.c


From: Simon Josefsson
Subject: [Bug-gnulib] bug in dummy.c
Date: Mon, 01 Nov 2004 00:53:53 +0100
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux)

It seems dummy.c doesn't work.  On Solaris 2.9 with GCC 3.3.2 and the
/usr/ccs/bin/ld from

ld: Software Generation Utilities - Solaris Link Editors: 5.9-1.373

I get this error:

ld: fatal: file ../gl/.libs/libgl.a: unknown file type
ld: fatal: File processing errors. No output written to .libs/libgsasl.so.7.0.0

nm can look at the archive, though, and says:

address@hidden:/tmp/jas4711/gsasl-0.2.0/lib$ nm -B gl/.libs/libgl.a

dummy.o:
address@hidden:/tmp/jas4711/gsasl-0.2.0/lib$

So it seems it cannot handle completely empty files.

The following patch work.  What do you think?

--- dummy.c     29 Sep 2004 01:59:27 +0200      1.2
+++ dummy.c     01 Nov 2004 00:51:28 +0100      
@@ -16,15 +16,20 @@
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
    USA.  */
 
-/* Some systems, reportedly OpenBSD and Mac OS X, refuse to create
-   libraries without any object files.  You might get an error like:
+/* Some systems, such as Solaris 2.9, OpenBSD and Mac OS X, refuse to
+   create libraries without any object files.  You might get an error
+   like:
 
    > ar cru .libs/libgl.a
    > ar: no archive members specified
 
-   Compiling this file, and adding its object file to the library, will
-   prevent the library from being empty.  */
+   Or:
+
+   ld: fatal: file ../gl/.libs/libgl.a: unknown file type
+
+   Compiling this file, and adding its object file to the library,
+   will prevent the library from being empty.  */
 
 /* This declaration is solely to ensure that after preprocessing
    this file is never empty.  */
-typedef int dummy;
+char dummy;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]