Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315658 - [OProfile] When native piece of opcontrol has not been installed yet, it should mention that header files for the oprofile package are necessary.
Summary: [OProfile] When native piece of opcontrol has not been installed yet, it shou...
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: LinuxTools (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: OProfile Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-03 15:36 EDT by Severin Gehwolf CLA
Modified: 2022-01-13 14:51 EST (History)
2 users (show)

See Also:


Attachments
Patch (4.91 KB, patch)
2010-06-03 16:41 EDT, Roland Grunberg CLA
akurtakov: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Severin Gehwolf CLA 2010-06-03 15:36:29 EDT
Build Identifier: I20100527-1700

When header files aren't installed the provided instructions won't work and a rather vague error message results. E.g.

$ make
g++ -g -Wall   -c -o stable.o stable.cc
g++ -g -Wall   -c -o oprofiledb.o oprofiledb.cc
oprofiledb.cc:14:28: error: op_sample_file.h: No such file or directory
In file included from oprofiledb.cc:17:
oprofiledb.h:19:17: error: odb.h: No such file or directory
In file included from oprofiledb.cc:17:
oprofiledb.h:29: error: ‘odb_key_t’ has not been declared
oprofiledb.h:29: error: ‘odb_value_t’ has not been declared
oprofiledb.h:66: error: ‘odb_key_t’ has not been declared
oprofiledb.h:66: error: ‘odb_value_t’ has not been declared
oprofiledb.h:67: error: ‘odb_key_t’ has not been declared
oprofiledb.h:67: error: ‘odb_value_t’ has not been declared
oprofiledb.h:68: error: ‘odb_key_t’ has not been declared
oprofiledb.h:68: error: ‘odb_value_t’ has not been declared
oprofiledb.h:80: error: ISO C++ forbids declaration of ‘odb_t’ with no type
oprofiledb.h:80: error: expected ‘;’ before ‘*’ token
oprofiledb.cc: In constructor ‘oprofile_db::oprofile_db(std::string)’:
oprofiledb.cc:22: error: class ‘oprofile_db’ does not have any field named ‘_tree’
oprofiledb.cc: In member function ‘void oprofile_db::_open_db()’:
oprofiledb.cc:41: error: ‘_tree’ was not declared in this scope
oprofiledb.cc:45: error: expected type-specifier before ‘odb_t’
oprofiledb.cc:45: error: expected ‘;’ before ‘odb_t’
oprofiledb.cc:46: error: ‘ODB_RDONLY’ was not declared in this scope
oprofiledb.cc:46: error: ‘opd_header’ was not declared in this scope
oprofiledb.cc:46: error: ‘odb_open’ was not declared in this scope
oprofiledb.cc:56: error: expected initializer before ‘*’ token
oprofiledb.cc:57: error: ‘hdr’ was not declared in this scope
oprofiledb.cc: In member function ‘void oprofile_db::_close_db()’:
oprofiledb.cc:64: error: ‘_tree’ was not declared in this scope
oprofiledb.cc:66: error: ‘odb_close’ was not declared in this scope
oprofiledb.cc:67: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
oprofiledb.cc:70: error: ‘_tree’ was not declared in this scope
oprofiledb.cc: At global scope:
oprofiledb.cc:74: error: variable or field ‘samples_odb_travel’ declared void
oprofiledb.cc:74: error: ‘odb_t’ was not declared in this scope
oprofiledb.cc:74: error: ‘hash’ was not declared in this scope
oprofiledb.cc:74: error: expected primary-expression before ‘int’
oprofiledb.cc:74: error: expected primary-expression before ‘int’
oprofiledb.cc:74: error: expected primary-expression before ‘callback’
oprofiledb.cc:74: error: expected primary-expression before ‘void’
make: *** [oprofiledb.o] Error 1

Reproducible: Always

Steps to Reproduce:
1. Make sure oprofile-devel is not installed
2. Try proposed procedure
Comment 1 Roland Grunberg CLA 2010-06-03 15:45:55 EDT
Agreed, the error is rather cryptic. In fact I was compiling oprofile from source, and when I got to compiling opxml I didn't understand what this error meant (partly because I was trying to avoid installing oprofile-devel). The readme file mentions the package needed for this, but I guess a more understandable warning in the configure script might benefit.
Comment 2 Severin Gehwolf CLA 2010-06-03 15:59:13 EDT
On that note, it should also mention that libbfd.a is required for linking. In
Fedora 13 that statically linked library is available in the binutils-static
package.
Comment 3 Severin Gehwolf CLA 2010-06-03 16:03:52 EDT
(In reply to comment #1)
> Agreed, the error is rather cryptic. In fact I was compiling oprofile from
> source, and when I got to compiling opxml I didn't understand what this error
> meant (partly because I was trying to avoid installing oprofile-devel). The
> readme file mentions the package needed for this, but I guess a more
> understandable warning in the configure script might benefit.

To be honest, I haven't had a look at README/INSTALL or anything like that. This is probably my bad, but if the Eclipse error gives instructions as to how to get rid of this error, I thought I might as well follow them.

Suggestion:
Put a README.Eclipse or maybe INSTALL.Eclipse in the native component directory and provide instructions there. It could reference upstream READMEs/INSTALLs, etc. Then, when opcontrol isn't found give a short error and include a pointer to README.Eclipse/INSTALL.Eclipse.

Thoughts?
Comment 4 Roland Grunberg CLA 2010-06-03 16:21:49 EDT
In the current trunk, there's an externalized string represented by "opcontrolProvider.error.statusMessage" which mentions running make/make install before running the install script. An additional line could be added there warning the user to read the README, or to make sure they have the necessary dependencies for opxml.
Comment 5 Roland Grunberg CLA 2010-06-03 16:41:38 EDT
Created attachment 171020 [details]
Patch

Proposed patch. This would just let the user know that the dependencies needed are listed in the readme file.
Comment 6 Andrew Overholt CLA 2010-06-03 16:49:24 EDT
More documentation is always better.  I'm fine with this change.
Comment 7 Roland Grunberg CLA 2010-06-03 17:07:16 EDT
Revision 24956 fixes this.
Comment 8 Severin Gehwolf CLA 2010-06-04 09:32:42 EDT
Is there a particular reason as to why there's no package for opxml (yet)? It would be cool if Linux users could install it from their distro's repositories. What am I missing? Thanks!
Comment 9 Andrew Overholt CLA 2010-06-04 10:17:21 EDT
opxml is _very_ specific to the Eclipse OProfile plugin so it doesn't make sense to have it as a separate package.
Comment 10 Roland Grunberg CLA 2010-06-07 13:32:42 EDT
The remaining issues/concerns prompted by this bug are mentioned in : 315770