Error in PCL 1.7.1 source release (RE: Trying to compile PCL 1.7.1: Compiler complains of missing "at".)

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

Error in PCL 1.7.1 source release (RE: Trying to compile PCL 1.7.1: Compiler complains of missing "at".)

Chris Volpe

Ok, I fixed this particular compilation problem. Once again (see my post yesterday regarding the 1.6 source distribution errors), there are apparent source code errors in the source distribution of this stable release. This time, the errors that elicit this problem occur in two locations: “io/src/ply_io.cpp” and “io/include/pcl/io/ply/ply_parser.h”.

 

In ply_io.cpp, in a block of code circa line 696, there are a bunch of calls to a global (i.e. non-member) templated function “at” in the pcl.io.ply namespace. As it turns out, there is no such function. The “at” function sought is the *member* function of ply_parser, which is declared in ply_parser.h. Fortunately, there’s an instance of ply_parser, which is also named ply_parser, upon which this function could be called. Replacing all occurrences of “pcl::io::ply::at” with “ply_parser.at” eliminated the “’at’: identifier not found” errors.

 

Unfortunately, those errors were replaced with different errors: “'pcl::io::ply::ply_parser::at' : too many template arguments”. Looking back at the template definition in ply_parser.h, I noticed that the functions are *defined* (not *declared*) with the “friend” keyword. This is, naturally, completely superfluous in this context, as the friend keyword grants access to *non*-member functions, and this is a member-function definition. Commenting out the word “friend” in the four overloaded definitions removes all compilation errors in ply_io.cpp.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Volpe ARA/SED
Sent: Friday, August 01, 2014 4:10 PM
To: pcl-users ([hidden email])
Subject: [PCL-users] Trying to compile PCL 1.7.1: Compiler complains of missing "at".

 

Hi folks-

 

I am trying to compile PCL 1.7.1 with MSVS2013. I have either installed or built dependencies that at least CMake is happy with, including boost 1.55.0. I am encountering a very strange compiler (not linker) error; “strange” because it does not appear to be the result of any interaction with a dependent library, but rather is entirely within the PCL source, which is supposedly a stable release.

 

One of the many occurrences of the error is as follows:

8>D:\Volpe\Software Downloads\PCL\pcl_1.7.1_src\pcl-pcl-1.7.1\pcl-pcl-1.7.1\io\src\ply_io.cpp(704): error C3861: 'at': identifier not found

 

It occurs a bunch of times in that file (ply_io.cpp), as well as a bunch of times in ply2ply.cpp and ply2raw.cpp.

 

The offending source line is:

pcl::io::ply::at<pcl::io::ply::uint16> (scalar_property_definition_callbacks) = boost::bind (&pcl::PLYReader::scalarPropertyDefinitionCallback<pcl::io::ply::uint16>, this, _1, _2);

 

As can be seen, “at” is a templated function nested three levels deep in namespaces. The cpp file #includes <pcl/io/ply_io.h>, which in turn #includes <pcl/io/ply/ply_parser.h>, which contains the definition:

 

          template <typename ScalarType>

          friend typename scalar_property_definition_callback_type<ScalarType>::type&

          at (scalar_property_definition_callbacks_type& scalar_property_definition_callbacks)

          {

              return (scalar_property_definition_callbacks.get<ScalarType> ());

          }

 

The result of the function call is to yield a reference to a callback field within the argument structure, to which is then assigned the result of a boost::bind call. Everything looks fine and dandy, except that the definition of this “at” function is not found.  The header file ply_parser.h is definitely being processed up to that definition of “at”, as evidenced by an “#error” directive I temporarily placed just before it just to trace the header file compilation.

 

 

 

Christopher R. Volpe, Ph.D.

Senior Scientist, Remote Sensing & Decision Analytics

 

Description: Description: cid:image003.png@01CE888B.0167BAD0

NATIONAL SECURITY  |  INFRASTRUCTURE  |  ENERGY & ENVIRONMENT  |  HEALTH SOLUTIONS

Applied Research Associates, Inc.

8537 Six Forks Road, Suite 600, Raleigh, NC 27615  |  T 919.582.3380  |  F 919.582.3301

 

Find Us Online

www.ara.com

Facebook: Applied Research Associates

LinkedIn: Company Page

LinkedIn Group

Twitter: ARA News

YouTube:  Applied Research Associates

 

 

 


_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Error in PCL 1.7.1 source release (RE: Trying to compile PCL 1.7.1: Compiler complains of missing "at".)

Sergey
Administrator
Hi,

Please have a look at this pull request. I think addresses the same problem.

You could try 1.7.2 release candidate which includes the aforementioned fix.

Regards,
Sergey
Reply | Threaded
Open this post in threaded view
|

Re: Error in PCL 1.7.1 source release (RE: Trying to compile PCL 1.7.1: Compiler complains of missing "at".)

Chris Volpe
Thanks for the link to the pull request, Sergey. It's a bit ironic: I had chosen to work with an official release precisely so that I wouldn't be impeded by the kind of compilation-preventing bugs that one would find on the bleeding edge of the repository.

-Chris

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Sergey
Sent: Monday, August 04, 2014 9:50 AM
To: [hidden email]
Subject: Re: [PCL-users] Error in PCL 1.7.1 source release (RE: Trying to compile PCL 1.7.1: Compiler complains of missing "at".)

Hi,

Please have a look at  this pull request <https://github.com/PointCloudLibrary/pcl/pull/411>  . I think addresses the same problem.

You could try  1.7.2 release candidate
<http://www.pcl-developers.org/1-7-2-Release-Candidate-td5709594.html>
which includes the aforementioned fix.

Regards,
Sergey



--
View this message in context: http://www.pcl-users.org/Error-in-PCL-1-7-1-source-release-RE-Trying-to-compile-PCL-1-7-1-Compiler-complains-of-missing-at-tp4035013p4035025.html
Sent from the Point Cloud Library (PCL) Users mailing list mailing list archive at Nabble.com.
_______________________________________________
[hidden email] / http://pointclouds.org http://pointclouds.org/mailman/listinfo/pcl-users
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Error in PCL 1.7.1 source release (RE: Trying to compile PCL 1.7.1: Compiler complains of missing "at".)

Chris Volpe
Note to self: Trim the message history when replying via email. Sorry, folks.
Reply | Threaded
Open this post in threaded view
|

Re: Error in PCL 1.7.1 source release (RE: Trying to compile PCL 1.7.1: Compiler complains of missing "at".)

Sergey
Administrator
In reply to this post by Chris Volpe
Chris,

Indeed ironic! You avoided bleeding edge library version, but used bleeding edge compiler version :)
(Okay, MSVC13 is probably not really bleeding edge, but still newer than the compilers with which that
release was tested.)

Regards,
Sergey