Clang Build error

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Clang Build error

Manuel Klimek via cfe-dev
Hi,
can I debug clang component with the CMAKE_BUILD_TYPE=MinSizeRel.
please reply. Thanks in advance.

Regards
Dharma
from India

------------------------
Hi,

do you use CMAKE_BUILD_TYPE=Debug? That uses a lot of RAM while linking
(~10GB), do you have that much RAM? If not try a
CMAKE_BUILD_TYPE=MinSizeRel build.


Am 26.03.2018 um 07:21 schrieb via cfe-dev:

> I am new to LLVM. Trying to learn Clang component. I have checked out the source of LLVM and CLANG from svn. Then I fired a build [ make clang]. But getting the follwing errors which I couldn't figure it out. Please help me to build debuggable clang component so that I can debug and understand. Errors are as follows.
>
> collect2: fatal error: ld terminated with signal 1 [Hangup]
> compilation terminated.
>       6 [main] ld 4384 C:\cygwin\usr\i686-pc-cygwin\bin\ld.exe: *** fatal error - cwcsdup would have returned NULL
> make[3]: *** [tools/clang/tools/driver/CMakeFiles/clang.dir/build.make:334: bin/clang-7.0.exe] Error 1
> make[3]: *** Deleting file 'bin/clang-7.0.exe'
> make[2]: *** [CMakeFiles/Makefile2:23389: tools/clang/tools/driver/CMakeFiles/clang.dir/all] Error 2
> make[1]: *** [CMakeFiles/Makefile2:23401: tools/clang/tools/driver/CMakeFiles/clang.dir/rule] Error 2
> make: *** [Makefile:7139: clang] Error 2
>
> Thanks in Advance.
>
> Regards
> Dharma
> from India.

_____________________________________
Sent from http://clang-developers.42468.n3.nabble.com

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Clang Build error

Manuel Klimek via cfe-dev
Hi,

you can of course debug it, but the build does not contain Debug
information. The code will be optimized and not correspond 1to1 to
source code.

You can of course use std::cout and friends to see whats going on.
Please note, that `RelWithDebInfo` exists, too. But that build type will
probably suffer from high RAM usage.


Best


Am 27.03.2018 um 13:05 schrieb via cfe-dev:

> Hi,
> can I debug clang component with the CMAKE_BUILD_TYPE=MinSizeRel.
> please reply. Thanks in advance.
>
> Regards
> Dharma
> from India
>
> ------------------------
> Hi,
>
> do you use CMAKE_BUILD_TYPE=Debug? That uses a lot of RAM while linking
> (~10GB), do you have that much RAM? If not try a
> CMAKE_BUILD_TYPE=MinSizeRel build.
>
>
> Am 26.03.2018 um 07:21 schrieb via cfe-dev:
>
>> I am new to LLVM. Trying to learn Clang component. I have checked out the source of LLVM and CLANG from svn. Then I fired a build [ make clang]. But getting the follwing errors which I couldn't figure it out. Please help me to build debuggable clang component so that I can debug and understand. Errors are as follows.
>>
>> collect2: fatal error: ld terminated with signal 1 [Hangup]
>> compilation terminated.
>>       6 [main] ld 4384 C:\cygwin\usr\i686-pc-cygwin\bin\ld.exe: *** fatal error - cwcsdup would have returned NULL
>> make[3]: *** [tools/clang/tools/driver/CMakeFiles/clang.dir/build.make:334: bin/clang-7.0.exe] Error 1
>> make[3]: *** Deleting file 'bin/clang-7.0.exe'
>> make[2]: *** [CMakeFiles/Makefile2:23389: tools/clang/tools/driver/CMakeFiles/clang.dir/all] Error 2
>> make[1]: *** [CMakeFiles/Makefile2:23401: tools/clang/tools/driver/CMakeFiles/clang.dir/rule] Error 2
>> make: *** [Makefile:7139: clang] Error 2
>>
>> Thanks in Advance.
>>
>> Regards
>> Dharma
>> from India.
> _____________________________________
> Sent from http://clang-developers.42468.n3.nabble.com
>
> _______________________________________________
> cfe-dev mailing list
> [hidden email]
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Clang Build error

Manuel Klimek via cfe-dev
I'm not sure if using ninja is an option, but if you're using it, you can also configure cmake with -DLLVM_PARALLEL_LINK_JOBS=1 to keep the RAM consumption down during linking. Although if you're running out of RAM on a single link job, this of course won't help.

On Tue, Mar 27, 2018 at 10:17 AM, Jonas Toth via cfe-dev <[hidden email]> wrote:
Hi,

you can of course debug it, but the build does not contain Debug
information. The code will be optimized and not correspond 1to1 to
source code.

You can of course use std::cout and friends to see whats going on.
Please note, that `RelWithDebInfo` exists, too. But that build type will
probably suffer from high RAM usage.


Best


Am 27.03.2018 um 13:05 schrieb via cfe-dev:
> Hi,
> can I debug clang component with the CMAKE_BUILD_TYPE=MinSizeRel.
> please reply. Thanks in advance.
>
> Regards
> Dharma
> from India
>
> ------------------------
> Hi,
>
> do you use CMAKE_BUILD_TYPE=Debug? That uses a lot of RAM while linking
> (~10GB), do you have that much RAM? If not try a
> CMAKE_BUILD_TYPE=MinSizeRel build.
>
>
> Am 26.03.2018 um 07:21 schrieb via cfe-dev:
>
>> I am new to LLVM. Trying to learn Clang component. I have checked out the source of LLVM and CLANG from svn. Then I fired a build [ make clang]. But getting the follwing errors which I couldn't figure it out. Please help me to build debuggable clang component so that I can debug and understand. Errors are as follows.
>>
>> collect2: fatal error: ld terminated with signal 1 [Hangup]
>> compilation terminated.
>>       6 [main] ld 4384 C:\cygwin\usr\i686-pc-cygwin\bin\ld.exe: *** fatal error - cwcsdup would have returned NULL
>> make[3]: *** [tools/clang/tools/driver/CMakeFiles/clang.dir/build.make:334: bin/clang-7.0.exe] Error 1
>> make[3]: *** Deleting file 'bin/clang-7.0.exe'
>> make[2]: *** [CMakeFiles/Makefile2:23389: tools/clang/tools/driver/CMakeFiles/clang.dir/all] Error 2
>> make[1]: *** [CMakeFiles/Makefile2:23401: tools/clang/tools/driver/CMakeFiles/clang.dir/rule] Error 2
>> make: *** [Makefile:7139: clang] Error 2
>>
>> Thanks in Advance.
>>
>> Regards
>> Dharma
>> from India.
> _____________________________________
> Sent from http://clang-developers.42468.n3.nabble.com
>
> _______________________________________________
> cfe-dev mailing list
> [hidden email]
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev