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

Bug#463572: marked as done (libc6-dev: supplied file /usr/lib/crt1.o produces linker error)



Your message dated Fri, 01 Feb 2008 16:25:03 +0100
with message-id <47A339CF.5050700@aurel32.net>
and subject line Bug#463572: libc6-dev: supplied file /usr/lib/crt1.o produces linker error
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: libc6-dev
Version: 2.7-6
Severity: normal


While trying to "compile" trivial Java sourcecode with
gcj-4.3 ld exits because of an undefined reference.

content of Hello.java:

// Hello.java
public class Hello
{
    public static void main()
    {
	System.out.println("Hello World");
    }
}


command leading to the error:

x@y:~/data/projects/java$ gcj-4.3 Hello.java
/usr/lib/gcc/i486-linux-gnu/4.3.0/../../../../lib/crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
collect2: ld returned 1 exit status


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.24 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages libc6-dev depends on:
ii  libc6                         2.7-6      GNU C Library: Shared libraries
ii  linux-libc-dev                2.6.24-2   Linux Kernel Headers for developme

Versions of packages libc6-dev recommends:
ii  gcc [c-compiler]          4:4.2.2-2      The GNU C compiler
ii  gcc-4.2 [c-compiler]      4.2.2-7        The GNU C compiler
ii  gcc-4.3 [c-compiler]      4.3-20080127-1 The GNU C compiler

PS	This is because i'm not shure reportbug sent anything.
	My Apologies in advance if it sent the report already.



--- End Message ---
--- Begin Message ---
Johann-Christoph Jacob a écrit :
> Package: libc6-dev
> Version: 2.7-6
> Severity: normal
> 
> 
> While trying to "compile" trivial Java sourcecode with
> gcj-4.3 ld exits because of an undefined reference.
> 
> content of Hello.java:
> 
> // Hello.java
> public class Hello
> {
>     public static void main()
>     {
> 	System.out.println("Hello World");
>     }
> }
> 
> 
> command leading to the error:
> 
> x@y:~/data/projects/java$ gcj-4.3 Hello.java
> /usr/lib/gcc/i486-linux-gnu/4.3.0/../../../../lib/crt1.o: In function `_start':
> (.text+0x18): undefined reference to `main'
> collect2: ld returned 1 exit status

There is no bug, it's just that your program has no main() function because:
1) The definition of main() is not correct. It should be main(String args[])
2) You should tell gcj which class is the main one using --main=Hello

-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net


--- End Message ---

Reply to: