Linking fails with unrecognized optio
Jean-Claude Beaudoin
jean.claude.beaudoin at gmail.com
Mon Jan 30 02:18:54 UTC 2017
On Sun, Jan 29, 2017 at 8:43 PM, Jean-Claude Beaudoin <
jean.claude.beaudoin at gmail.com> wrote:
>
> Yep! That's a goofy bug of mine. I hit on it recently in a somewhat
> different context.
>
> On Sun, Jan 29, 2017 at 7:41 PM, Stefan Husmann <
> stefan-husmann at t-online.de> wrote:
>
>>
>> Hello,
>>
>> I have a linking problem under Arch Linux with GCC 6.3.1 toolchain.
>>
>> ;;; About to build main executable mkcl.
>> build-program failed: (mkcl:run-command "\"gcc\" -o
>> \"/home/haawda/paketierung/meine_Pakete/mkcl/src/mkcl-1.1.10/src/bin/mkcl-small\"
>> \"-Wl,--whole-archive\" \"/home/haawda/paketierung/mei
>> ne_Pakete/mkcl/src/mkcl-1.1.10/src/bin/MKCLINITBQHUwf.o\"
>> \"-Wl,--no-whole-archive\" -rdynamic -Wl,--enable-new-dtags
>> -Wl,-rpath,$ORIGIN/../lib -Wl,--whole-archive \"/home/haawda/paketierung/mei
>> ne_Pakete/mkcl/src/mkcl-1.1.10/src/mkcltop.a\"
>> \"/home/haawda/paketierung/meine_Pakete/mkcl/src/mkcl-1.1.10/src/lsp.a\"
>> \"/home/haawda/paketierung/meine_Pakete/mkcl/src/mkcl-1.1.10/src/mkclmin.a\"
>> \"/home/haawda/paketierung/meine_Pakete/mkcl/src/mkcl-1.1.10/src/mkclgc.a\"
>> \"/home/haawda/paketierung/meine_Pakete/mkcl/src/mkcl-1.1.10/src/libmkcc1.a\"
>> -Wl,--no-whole-archive-Wl,-O1,--sort-common,--as-needed,-z,relro -lgmp
>> -lm -lrt -pthread -ldl ") returned non-zero value 1
>> Command output:
>> /usr/bin/ld: unrecognized option '--no-whole-archive-Wl'
>> /usr/bin/ld: use the --help option for usage information
>>
>> This happens both with mkcl 1.1.10 tarball and newest sources from
>> https://gitlab.common-lisp.net/mkcl/mkcl.git.
>>
>> I think this comes from the gc subdirectory's configure script.
>>
>>
> Don't think so. I'd bet much more on a missing blank space somewhere in
> mkcl/src/cmp/cmpmain.lsp or mkcl/src/cmp/cmpdefs.lsp.in.
>
> I'll investigate and get back to you with a possible fix.
>
>
>> Help would be appreciated.
>>
>> Best Regards
>>
>> Stefan Husmann
>>
>>
>
Could you try the attached patch?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/mkcl-devel/attachments/20170129/48587770/attachment.html>
-------------- next part --------------
diff --git a/src/cmp/cmpmain.lsp b/src/cmp/cmpmain.lsp
index 51da7a6..0951787 100644
--- a/src/cmp/cmpmain.lsp
+++ b/src/cmp/cmpmain.lsp
@@ -158,7 +158,7 @@
(dolist (lib mkcl-libraries)
(push (mkcl:bstr+ "\"" mkcl-libdir lib "\" ") out))
- (unless use-mkcl-shared-libs (push "-Wl,--no-whole-archive" out))
+ (unless use-mkcl-shared-libs (push "-Wl,--no-whole-archive " out))
(if use-external-shared-libs
(push *syslibs-&-ld-flags-tail* out)
@@ -185,7 +185,7 @@
(dolist (lib *mkcl-static-libs*)
(push (mkcl:bstr+ "\"" mkcl-libdir lib "\" ") out)))
- (push "-Wl,--no-whole-archive" out)
+ (push "-Wl,--no-whole-archive " out)
(push *static-program-ld-flags-tail* out)
More information about the mkcl-devel
mailing list