ΕΕΛ/ΛΑΚ - Λίστες Ταχυδρομείου

Re: Gcc 4.6 (Ubuntu)

Στις 3 Οκτωβρίου 2011 6:40 μ.μ., ο χρήστης Konstantinos Margaritis
<markos [ at ] codex [ dot ] gr> έγραψε:
> On Monday 03 October 2011 18:09:28 Konstantinos Margaritis wrote:
>> On Monday 03 October 2011 07:07:29 Nick Kossifidis wrote:
>> > Και ξαναρωτάω γιατί πραγματικά δε πιστεύω ότι γράφω Κινέζικα, πού
>> > ακριβώς λέω ότι φταίει κάτι/κάποιος ? Απλά ρωτάω αν έχετε δει κάτι
>> > αντίστοιχο ! Έστω ότι έχω memory corrupting bug, γιατί στον 4.4.6 και
>> > στον 4.5.2 δε φαίνεται και όλα δουλεύουν μια χαρά και φαίνεται στον
>> > 4.6 ?
>>
>> Μόνο τον τελευταίο μήνα έκανα report 4 Internal Compiler Errors του gcc
>> 4.6, στο Debian -που μοιάζει με του Ubuntu καθώς χρησιμοποιούν αμφότερα το
>> gcc- linaro tree τουλάχιστον σε ARM στο οποίο δουλεύω- μαζί με τα minimal
>> testcases τους, οπότε ναι μην αγχώνεσαι, είναι συνηθισμένο. Σε σχέση με
>> τον 4.4, και λιγότερο με τον 4.5, ο 4.6 είναι πολύ buggy ακόμη, δεν είναι
>> τυχαίο που πολλά σοβαρά projects έχουν μείνει ακόμη σε 4.4.
>> Πάντως, βάζεις μαζί ldflags και cflags σε object creation, καλύτερα
>> διαχώρισέ τα. Δηλαδή, όταν παράγεις το .ο, τα $ldflags είναι αχρηστα. Και
>> έχε υπόψιν σου ότι το Ubuntu χρησιμοποιεί gold ως linker οπότε και εκεί
>> αλλάζουν αρκετά.
>
> Μάλλον βιάστηκα. Δεν χρησιμοποιεί gold, αλλά τα πακέτα απαιτείται να γίνονται
> σωστά build με gold. Επίσης, ίσως βρήκα μια ερμηνεία για το πρόβλημα που
> συναντάς:
>
> Από το:
>
> http://lists.debian.org/debian-devel-announce/2011/02/msg00011.html
>
> Fix build failures with ld --as-needed
> - --------------------------------------
>
> [Note this is not turned on by default]
>
> Many packages fail to build when the linker is passed --as-needed as the
> default.  These issues are collected at [4] (please tag new issues
> accordingly).
>  The vast majority of these kind of failures are some assumptions about link
> order with the GNU linker (ld), which may not be fulfilled with other linkers.
> Issues are of the form:
>
>  gcc -o foo -lbar foo.o
>
> When processing the command line, libbar isn't needed to fulfil any
> dependencies, so it is ignored, and the link step will fail when trying to
> resolve symbols found in foo.o. The fix is to pass object files before
> libraries
> on the command line:
>
>  gcc -o foo foo.o -lbar
>
> A common mistake with automake is to add libraries to the various LDFLAGS
> macros.  If you need to link a program with a library, add this library to one
> of the LDADD macros, if you need to link a library with a library, add to one
> of
> the LIBADD macros.  For tracking dependencies with local libraries, you may
> need
> add the library to one of the DEPENDENCIES macros.  See the automake manual
> for
> more details.
>
> Ελπίζω να σε καλύπτει.
>

Να 'σαι καλά ρε φίλε, νάτο ->
http://ubuntuforums.org/showthread.php?t=1833136 στο ubuntu το έχουν
enabled by default κι έπρεπε να μυρίσω τα νύχια μου... Στα release
notes του 4.6 λέει ότι τα command line arguments έγιναν ποιο strict
αλλά το παράδειγμα που αναφέρει δεν έχει σχέση με αυτό που βλέπω, αυτό
που μου έστειλες ήταν just.


-- 
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick

αναφορές

πλοήγηση μηνυμάτων