SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
sorry if this is answered elsewhere, but my searches didn't come up with anything related.
recently i updated some software on my computer with swaret, and all went fine, i thought. but since then i cannot compile any programs. i'd looked into it more recently and found that the error stems from ld, here are some of the errors exhibited:
---------------------------------------------------------
root@hostname:/usr/src/linux# make menuconfig
HOSTCC scripts/basic/fixdep
/usr/bin/ld: unrecognized option '--as-needed'
/usr/bin/ld: use the --help option for usage information
collect2: ld returned 1 exit status
make[1]: *** [scripts/basic/fixdep] Error 1
make: *** [scripts_basic] Error 2
---------------------------------------------------------
root@hostname:/home/user/downloads/gpgme-0.3.16# ./configure
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking for C compiler default output... configure: error: C compiler cannot create executables
See `config.log' for more details.
root@hostname:/home/user/downloads/gpgme-0.3.16#
--------------------------------------------------------------
root@hostname:/proc/bus/usb# ld --as-needed
ld: unrecognized option '--as-needed'
ld: use the --help option for usage information
root@hostname:/proc/bus/usb#
----------------------------------------------------------------
so i realized that the problem came from ld, but how can i fix this? where is this --as-needed option specified? if any more info is needed, I'm here.
system:
slackware 9, updated occasionally to -current though swaret
celeron 600mhz, 192 mb ram, 10gb harddrive.
Last edited by aoe2bug; 07-10-2010 at 02:25 AM.
Reason: anon
AFAIK, 'ld' doesn't have the option '--as-needed'..............my guess is whatever installation is passing that option is at fault............ld is the GNU linker and found in the binutils package...............I just upgraded my kernel a couple of days ago to version 2.4.26, and I had no problems upgrading (other than some problems with not making the correct modules in the menuconfig, but that was user error.... )
As for configureing that gpg package, the problem is with the compiler itself and says to look in the " 'config.log' for more details"..............could be it's not finding the right header files (aka, "includes").......
Thanks. I figured that '--as-needed' probably wasn't a valid option, but where would it be configured? (how can i turn it off). the config.log file just shows the ld error i posted, i was just using gpg as an example. I've never had any problems before with compiling. i compiled linux 2.6.4 and .5 and .6 easily. (i was bored the weeks that they were released). anyway, i was going to do a complete reinstall with 10 anyway, (it would be easier then figuring out which packages to uninstall to free up space, 300mb left) if anyone knows how to change the ld thing that'd be great, but otherwise thanks thegeekster.
Last edited by aoe2bug; 07-10-2010 at 02:26 AM.
Reason: anon
I worked around the problem by editing
/usr/lib/gcc-lib/<platform>/<version>/specs file
to remove the --as-needed and --noas-needed switches,
now everything works!
it's very strange that this problem occurs with the same exact version of gcc+binutils that don't have a problem on other platforms.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.