[CMake] Specify 32-bit compilation to Clang
Robert Dailey
rcdailey.lists at gmail.com
Tue Jan 20 19:56:11 EST 2015
On Tue, Jan 20, 2015 at 9:58 AM, Nils Gladitz <nilsgladitz at gmail.com> wrote:
> On 01/20/2015 04:48 PM, Robert Dailey wrote:
>>
>> On Mon, Jan 19, 2015 at 2:12 PM, Nils Gladitz <nilsgladitz at gmail.com>
>> wrote:
>>>
>>> On 19.01.2015 21:08, Robert Dailey wrote:
>>>>
>>>>
>>>> I have done this and it fails while linking the test program during
>>>> configuration:
>>>>
>>>> /usr/bin/ld: cannot find crtbegin.o: no such file or directory
>>>> /usr/bin/ld: cannot find -lgcc
>>>> /usr/bin/ld: cannot find -lgcc_s
>>>>
>>>> Any ideas?
>>>>
>>>
>>> Try installing the g++-multilib package.
>>
>>
>> Installed this as you instructed, deleted CMakeCache.txt and re-ran
>> generation. Got the errors below:
>>
>
>
>>
>> /usr/bin/ld: skipping incompatible
>> /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/libgcc.a when searching for
>> -lgcc
>
>
> From the diagnostic it looks like clang shares gcc 4.8's libraries.
>
> Is the system wide default gcc 4.8 as well?
> e.g. does "gcc --version" report 4.8.x?
>
> If it isn't installing g++-4.8-multilib might help (If 4.8 is the default
> g++-multilib will already have installed it).
Here are the results:
robert at robert-VirtualBox ~ $ gcc --version
gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
robert at robert-VirtualBox ~ $ sudo apt-get install g++-4.8-multilib
[sudo] password for robert:
Reading package lists... Done
Building dependency tree
Reading state information... Done
g++-4.8-multilib is already the newest version.
g++-4.8-multilib set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 172 not upgraded.
More information about the CMake
mailing list