Scalpel compilation

61 views
Skip to first unread message

agent

unread,
Jan 14, 2012, 4:40:29 AM1/14/12
to scalpel-users
Hello!

First of all, i'd like to say thank you for such a huge work!

And i have some questions about Scalpel compilation.

Firstly, as i see on build page on your site, you develop the library
on Linux, so i'd like to know what compiler, of what version and on
what system do you use? It is not compiled on openSUSE 11.4 with
system gcc 4.5 (complaining about nullptr), gcc 4.6 (complaining about
some ambigious overloaded functions (the last one is:

/home/agent/dev/scalpel/scalpel/src/scalpel/cpp/semantic_analysis/
detail/name_lookup.ipp:1090:2: error: call of overloaded
‘end(boost::iterator_range<boost::transform_iterator<std::function<scalpel::cpp::semantic_entities::member_enum&(const
std::unique_ptr<scalpel::cpp::semantic_entities::member_enum>&)>,
__gnu_cxx::__normal_iterator<const
std::unique_ptr<scalpel::cpp::semantic_entities::member_enum>*,
std::vector<std::unique_ptr<scalpel::cpp::semantic_entities::member_enum>
> >, boost::use_default, boost::use_default> >&)’ is ambiguous

)), latest gcc 4.7 from Factory (goes further than previous compilers,
but after 1000-lines template hell on my terminal stucks with message:
"use of deleted function..." as follows:

/usr/include/boost/optional/optional.hpp:404:69: error: use of deleted
function ‘scalpel::cpp::syntax_nodes::hex_octo&
scalpel::cpp::syntax_nodes::hex_octo::operator=(const
scalpel::cpp::syntax_nodes::hex_octo&)’

). All these attempts were made against Boost 1.44 from repos. I have
read that sometimes C++11 features conflict with boost, but i don't
know what to do with it.

Secondly, is the last commit on Gitorious compilable at all? :)

Waiting for your answer,
Dmitry.

agent

unread,
Jan 14, 2012, 12:56:30 PM1/14/12
to scalpel-users
remark for the previous message:
i have retried compiling with gcc 4.7 and latest boost 1.48, maybe
they have fixed some incompatibilities with c++11, but the same error
appeared. so i don't know who is responsible for it: not release gcc,
boost or scalpel :)

agent

unread,
Jan 14, 2012, 12:52:21 PM1/14/12
to scalpel-users
some remarks for previous message:
i have retried compiling it with gcc 4.7 and latest boost 1.48, maybe
they have fixed some incompatibilities with c++11, but the same error
appeared. so i don't know who is responsible for it: not released gcc,
boost or scalpel :)

Florian Goujeon

unread,
Jan 14, 2012, 2:13:09 PM1/14/12
to scalpe...@googlegroups.com
Hi Dmitry,

It's strange, GCC 4.6 should be able to make it. It's the compiler I use.
Let me find what's wrong�

Florian Goujeon

unread,
Jan 14, 2012, 2:57:19 PM1/14/12
to scalpe...@googlegroups.com
Could you try with the up-to-date version in Github?

agent

unread,
Jan 15, 2012, 3:17:55 AM1/15/12
to scalpel-users
On 15 янв, 01:57, Florian Goujeon <florian.gouj...@42ndart.org> wrote:
> Could you try with the up-to-date version in Github?

yes, thanks, it works. there was a problem with compiling demo program
-- it didn't link boost filesystem for some reason, but i think i
managed to fix this (added "REQUIRED filesystem" in find_package(); i
have never written CMakeLists before, so it could be wrong)

btw, STL headers are too hard for it yet! but this project is
interesting for me, i'll try to study its code

Florian Goujeon

unread,
Jan 15, 2012, 6:51:37 AM1/15/12
to scalpe...@googlegroups.com
> yes, thanks, it works. there was a problem with compiling demo program
> -- it didn't link boost filesystem for some reason, but i think i
> managed to fix this (added "REQUIRED filesystem" in find_package(); i
> have never written CMakeLists before, so it could be wrong)
You did (almost) well :). There was indeed a missing dependency to
Boost.Filesystem. It's one of the changes I did yesterday (except I did
it in test/CMakeLists.txt instead of demo/CMakeLists.txt).

> btw, STL headers are too hard for it yet! but this project is
> interesting for me, i'll try to study its code

The are, indeed.
Scalpel is able to parse them (syntax analysis), but isn't able to
semantically analyze them yet. Scalpel can't semantically analyze
templates for now (see http://42ndart.org/scalpel/feature-matrix.html).
Please note that GCC's standard library implementation (as well as most
of compiler-specific implementations) uses non-standard extensions.
Since Scalpel won't support this kind of extensions (see
http://42ndart.org/scalpel/news/necessary-regression.html), I recommand
you to do you tests on the Apache's implementation.

It's nice to see people interested in my project :). Don't hesitate to
contact me with any queries.

Reply all
Reply to author
Forward
0 new messages