October 21, 2013 Re: building ldc on raspberry pi | ||||
---|---|---|---|---|
| ||||
Posted in reply to Knud Soerensen | On 2013-10-22 01:02, Knud Soerensen wrote: > On 2013-10-22 00:18, David Nadlinger wrote: >> On Tue, Oct 22, 2013 at 12:13 AM, Knud Soerensen <4tuu4k002@sneakemail.com> wrote: >>> based on DMD v2.063.2 and LLVM 3.2 >> >> You need at least LLVM 3.3 to hope that things work. I thought this was mentioned on the Wiki page, but apparently it wasn't – added it. >> >> David >> > I installed llvm 3.4 and is now making. > > But I noticed cmake says: > Found LLVM: /usr/lib/llvm-3.4 (found suitable version "3.4", minimum > required is "3.1") > > Maybe the minimum cmake accept should be raised. > > Knud > Using llvm 3.4 I get to [ 6%] Building CXX object CMakeFiles/LDCShared.dir/gen/classes.cpp.o [ 6%] Building CXX object CMakeFiles/LDCShared.dir/gen/abi-ppc64.cpp.o [ 6%] Building CXX object CMakeFiles/LDCShared.dir/gen/abi-x86.cpp.o [ 6%] Building CXX object CMakeFiles/LDCShared.dir/gen/complex.cpp.o [ 6%] Building CXX object CMakeFiles/LDCShared.dir/gen/programs.cpp.o /home/knud/ldc/gen/programs.cpp: In function ‘std::string getProgram(const char*, const llvm::cl::opt<std::basic_string<char> >&, const char*)’: /home/knud/ldc/gen/programs.cpp:55:43: error: no match for ‘operator=’ in ‘path = llvm::sys::FindProgramByName(const string&)()’ /home/knud/ldc/gen/programs.cpp:55:43: note: candidates are: /usr/include/c++/4.6/bits/basic_string.h:541:7: note: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::operator=(const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>, std::basic_string<_CharT, _Traits, _Alloc> = std::basic_string<char>] /usr/include/c++/4.6/bits/basic_string.h:541:7: note: no known conversion for argument 1 from ‘llvm::sys::Path’ to ‘const std::basic_string<char>&’ /usr/include/c++/4.6/bits/basic_string.h:549:7: note: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::operator=(const _CharT*) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>, std::basic_string<_CharT, _Traits, _Alloc> = std::basic_string<char>] /usr/include/c++/4.6/bits/basic_string.h:549:7: note: no known conversion for argument 1 from ‘llvm::sys::Path’ to ‘const char*’ /usr/include/c++/4.6/bits/basic_string.h:560:7: note: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::operator=(_CharT) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>, std::basic_string<_CharT, _Traits, _Alloc> = std::basic_string<char>] /usr/include/c++/4.6/bits/basic_string.h:560:7: note: no known conversion for argument 1 from ‘llvm::sys::Path’ to ‘char’ /home/knud/ldc/gen/programs.cpp:58:43: error: no match for ‘operator=’ in ‘path = llvm::sys::FindProgramByName(const string&)()’ /home/knud/ldc/gen/programs.cpp:58:43: note: candidates are: /usr/include/c++/4.6/bits/basic_string.h:541:7: note: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::operator=(const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>, std::basic_string<_CharT, _Traits, _Alloc> = std::basic_string<char>] /usr/include/c++/4.6/bits/basic_string.h:541:7: note: no known conversion for argument 1 from ‘llvm::sys::Path’ to ‘const std::basic_string<char>&’ /usr/include/c++/4.6/bits/basic_string.h:549:7: note: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::operator=(const _CharT*) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>, std::basic_string<_CharT, _Traits, _Alloc> = std::basic_string<char>] /usr/include/c++/4.6/bits/basic_string.h:549:7: note: no known conversion for argument 1 from ‘llvm::sys::Path’ to ‘const char*’ /usr/include/c++/4.6/bits/basic_string.h:560:7: note: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::operator=(_CharT) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>, std::basic_string<_CharT, _Traits, _Alloc> = std::basic_string<char>] /usr/include/c++/4.6/bits/basic_string.h:560:7: note: no known conversion for argument 1 from ‘llvm::sys::Path’ to ‘char’ /home/knud/ldc/gen/programs.cpp:61:43: error: no match for ‘operator=’ in ‘path = llvm::sys::FindProgramByName(const string&)()’ /home/knud/ldc/gen/programs.cpp:61:43: note: candidates are: /usr/include/c++/4.6/bits/basic_string.h:541:7: note: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::operator=(const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>, std::basic_string<_CharT, _Traits, _Alloc> = std::basic_string<char>] /usr/include/c++/4.6/bits/basic_string.h:541:7: note: no known conversion for argument 1 from ‘llvm::sys::Path’ to ‘const std::basic_string<char>&’ /usr/include/c++/4.6/bits/basic_string.h:549:7: note: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::operator=(const _CharT*) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>, std::basic_string<_CharT, _Traits, _Alloc> = std::basic_string<char>] /usr/include/c++/4.6/bits/basic_string.h:549:7: note: no known conversion for argument 1 from ‘llvm::sys::Path’ to ‘const char*’ /usr/include/c++/4.6/bits/basic_string.h:560:7: note: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::operator=(_CharT) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>, std::basic_string<_CharT, _Traits, _Alloc> = std::basic_string<char>] /usr/include/c++/4.6/bits/basic_string.h:560:7: note: no known conversion for argument 1 from ‘llvm::sys::Path’ to ‘char’ make[2]: *** [CMakeFiles/LDCShared.dir/gen/programs.cpp.o] Error 1 make[1]: *** [CMakeFiles/LDCShared.dir/all] Error 2 make: *** [all] Error 2 |
October 22, 2013 Re: building ldc on raspberry pi | ||||
---|---|---|---|---|
| ||||
Posted in reply to Knud Soerensen | On Monday, 21 October 2013 at 23:02:21 UTC, Knud Soerensen wrote:
> But I noticed cmake says:
> Found LLVM: /usr/lib/llvm-3.4 (found suitable version "3.4", minimum
> required is "3.1")
>
> Maybe the minimum cmake accept should be raised.
Hi Knud!
That is really difficult as each architecture has a different state. You can use LLVM 3.1 with LDC if you are targeting x86/x86_64. Other targets are less mature and may require newer versions of LLVM. E.g. PPC64 requires at least LLVM 3.3, PPC32 at least LLVM 3.4.
Regards
Kai
|
October 22, 2013 Re: building ldc on raspberry pi | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Nadlinger | Hi YES, I was successful building ldc on raspberry pi with LLVM 3.3. On 2013-10-22 00:18, David Nadlinger wrote: > On Tue, Oct 22, 2013 at 12:13 AM, Knud Soerensen <4tuu4k002@sneakemail.com> wrote: >> based on DMD v2.063.2 and LLVM 3.2 > > You need at least LLVM 3.3 to hope that things work. I thought this was mentioned on the Wiki page, but apparently it wasn't – added it. > > David > -- Join me on Skype knudhs Facebook http://www.facebook.com/profile.php?id=1198821880 Linkedin http://www.linkedin.com/pub/0/117/a54 Twitter http://twitter.com/knudsoerensen bitcoin donations: 13ofyUKqFL43uRJHZtNozyMVP4qxKPsAR2 |
October 22, 2013 Re: building ldc on raspberry pi | ||||
---|---|---|---|---|
| ||||
Posted in reply to Knud Soerensen | On Monday, 21 October 2013 at 23:39:41 UTC, Knud Soerensen wrote:
> On 2013-10-22 01:02, Knud Soerensen wrote:
>
> Using llvm 3.4 I get to
>
> [ 6%] Building CXX object CMakeFiles/LDCShared.dir/gen/classes.cpp.o
> [ 6%] Building CXX object CMakeFiles/LDCShared.dir/gen/abi-ppc64.cpp.o
> [ 6%] Building CXX object CMakeFiles/LDCShared.dir/gen/abi-x86.cpp.o
> [ 6%] Building CXX object CMakeFiles/LDCShared.dir/gen/complex.cpp.o
> [ 6%] Building CXX object CMakeFiles/LDCShared.dir/gen/programs.cpp.o
> /home/knud/ldc/gen/programs.cpp: In function ‘std::string
> getProgram(const char*, const llvm::cl::opt<std::basic_string<char> >&,
> const char*)’:
> /home/knud/ldc/gen/programs.cpp:55:43: error: no match for ‘operator=’
> in ‘path = llvm::sys::FindProgramByName(const string&)()’
> /home/knud/ldc/gen/programs.cpp:55:43: note: candidates are:
> /usr/include/c++/4.6/bits/basic_string.h:541:7: note:
> std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT,
> _Traits, _Alloc>::operator=(const std::basic_string<_CharT, _Traits,
> _Alloc>&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc
> = std::allocator<char>, std::basic_string<_CharT, _Traits, _Alloc> =
> std::basic_string<char>]
<snip>
That is a bit strange. The only issue with LLVM 3.4 I am aware of is that you should enable assertions on LLVM or define NDEBUG while building ldc. Otherwise you get a link error while linking ldc2.
Could you please some more information about your environment? gcc (or clang) version and glibc version could be helpful.
Thanks for trying this!
Regards
Kai
|
October 22, 2013 Re: building ldc on raspberry pi | ||||
---|---|---|---|---|
| ||||
Posted in reply to Kai Nacke | On Tue, Oct 22, 2013 at 10:04 PM, Kai Nacke <kai@redstar.de> wrote: > On Monday, 21 October 2013 at 23:39:41 UTC, Knud Soerensen wrote: >> >> On 2013-10-22 01:02, Knud Soerensen wrote: >> >> Using llvm 3.4 I get to >> >> [ 6%] Building CXX object CMakeFiles/LDCShared.dir/gen/classes.cpp.o >> [ 6%] Building CXX object CMakeFiles/LDCShared.dir/gen/abi-ppc64.cpp.o >> [ 6%] Building CXX object CMakeFiles/LDCShared.dir/gen/abi-x86.cpp.o >> [ 6%] Building CXX object CMakeFiles/LDCShared.dir/gen/complex.cpp.o >> [ 6%] Building CXX object CMakeFiles/LDCShared.dir/gen/programs.cpp.o >> /home/knud/ldc/gen/programs.cpp: In function ‘std::string >> getProgram(const char*, const llvm::cl::opt<std::basic_string<char> >&, >> const char*)’: >> /home/knud/ldc/gen/programs.cpp:55:43: error: no match for ‘operator=’ >> in ‘path = llvm::sys::FindProgramByName(const string&)()’ >> /home/knud/ldc/gen/programs.cpp:55:43: note: candidates are: >> /usr/include/c++/4.6/bits/basic_string.h:541:7: note: >> std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, >> _Traits, _Alloc>::operator=(const std::basic_string<_CharT, _Traits, >> _Alloc>&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc >> = std::allocator<char>, std::basic_string<_CharT, _Traits, _Alloc> = >> std::basic_string<char>] > > <snip> > > That is a bit strange. Yes, indeed, especially since the Travis 3.4 build is green: https://travis-ci.org/ldc-developers/ldc Maybe either the version Knud is using or the snapshot Travis is pulling in is out of date? > The only issue with LLVM 3.4 I am aware of is that > you should enable assertions on LLVM or define NDEBUG while building ldc. > Otherwise you get a link error while linking ldc2. Wasn't that also the same for at least some of the previous versions as well? David |
October 22, 2013 Re: building ldc on raspberry pi | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Nadlinger | On Tuesday, 22 October 2013 at 20:14:04 UTC, David Nadlinger wrote:
> On Tue, Oct 22, 2013 at 10:04 PM, Kai Nacke <kai@redstar.de> wrote:
>> The only issue with LLVM 3.4 I am aware of is that
>> you should enable assertions on LLVM or define NDEBUG while building ldc.
>> Otherwise you get a link error while linking ldc2.
>
> Wasn't that also the same for at least some of the previous versions as well?
No. This is a LLVM "optimization" introduced during 3.4 development. I was building LLVM on Linux/PPC64 on a weekly base, always starting with a fresh image and using the same script. Suddenly, it stopped working because of this.
Kai
|
October 23, 2013 Re: building ldc on raspberry pi | ||||
---|---|---|---|---|
| ||||
Posted in reply to Knud Soerensen | On Tue, Oct 22, 2013 at 10:45 AM, Knud Soerensen <4tuu4k002@sneakemail.com> wrote: > YES, I was successful building ldc on raspberry pi with LLVM 3.3. If you'd like to help out with getting LDC to work properly on ARM, you might be interested in the tentative druntime patch fixing the libunwind interface I just posted to GitHub: https://github.com/ldc-developers/ldc/issues/489. David |
Copyright © 1999-2021 by the D Language Foundation