Closed Bug 1405326 Opened 3 years ago Closed 3 years ago

check for linker fails on Solaris


(Firefox Build System :: General, defect)

Not set


(firefox58 fixed)

Tracking Status
firefox58 --- fixed


(Reporter: petr.sumbera, Assigned: petr.sumbera)




(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0
Build ID: 20170921064520

Steps to reproduce:

 0:14.78 checking for linker...
 0:14.78 DEBUG: Executing: `/usr/bin/gcc`
 0:14.78 DEBUG: Executing: `/usr/bin/gcc -std=gnu99 -Wl,--version`
 0:14.78 DEBUG: The command returned non-zero exit status 1.
 0:14.78 DEBUG: Its error output was:
 0:14.78 DEBUG: | collect2 version 5.4.0
 0:14.78 DEBUG: | /usr/bin/ld -Y P,/lib/amd64:/usr/lib/amd64 -Qy /usr/lib/amd64/crt1.o /usr/gcc/5/lib/gcc/x86_64-pc-solaris2.11/5.4.0/crtp.o /usr/lib/amd64/crti.o /usr/lib/amd64/values-Xa.o /usr/lib/amd64/values-xpg6.o /usr/gcc/5/lib/gcc/x86_64-pc-solaris2.11/5.4.0/crtbegin.o -L/usr/gcc/5/lib/gcc/x86_64-pc-solaris2.11/5.4.0 -L/usr/gcc/5/lib/gcc/x86_64-pc-solaris2.11/5.4.0/../../../amd64 -L/lib/amd64 -L/usr/lib/amd64 -L/usr/gcc/5/lib/gcc/x86_64-pc-solaris2.11/5.4.0/../../.. --version -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/gcc/5/lib/gcc/x86_64-pc-solaris2.11/5.4.0/crtend.o /usr/lib/amd64/crtn.o
 0:14.78 DEBUG: | ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.3120
 0:14.78 DEBUG: | Undefined                     first referenced
 0:14.78 DEBUG: |  symbol                           in file
 0:14.78 DEBUG: | main                                /usr/lib/amd64/crt1.o
 0:14.78 DEBUG: | ld: fatal: symbol referencing errors
 0:14.78 DEBUG: | collect2: error: ld returned 1 exit status
 0:14.78 ERROR: Command `/usr/bin/gcc -std=gnu99 -Wl,--version` failed with exit status 1.

This was already discussed here:

The problem with the check is:
- Solaris ld continues to process with linking even when '--version' is present.
- version output is put on stderr
Component: Untriaged → Build Config
Product: Firefox → Core
Attached patch Bug1405326.patchSplinter Review
This is not ideal but for now it should be hopefully enough.
Attachment #8914758 - Flags: review?(sledru)
Comment on attachment 8914758 [details] [diff] [review]

You confirm that it works for you?
We should probably rename the function as it is no longer true
Yes. This work for me. Not sure about the name. The function is little bit confusing in general...
Assignee: nobody → petr.sumbera
Comment on attachment 8914758 [details] [diff] [review]

Works for me but Mike is the official reviewer.
I opened bug 1405982 to rename the method.
Attachment #8914758 - Flags: review?(sledru)
Attachment #8914758 - Flags: review?(mh+mozilla)
Attachment #8914758 - Flags: feedback+
Maybe my patch is wrong. After enabling more ldflags via:

I see that I'm getting options safeguarded with 'cc_use_gnu_ld==1' (--version-script).
Ok probably not related. It's being set probably here:
Attachment #8914758 - Flags: review?(mh+mozilla) → review+
Keywords: checkin-needed
Pushed by
check for linker fails on Solaris r=glandium
Keywords: checkin-needed
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.