* Unable to get a plugin working
@ 2010-02-13 1:26 Hristina Fidanoska
2010-02-13 1:54 ` Ian Lance Taylor
0 siblings, 1 reply; 5+ messages in thread
From: Hristina Fidanoska @ 2010-02-13 1:26 UTC (permalink / raw)
To: gcc-help
Hello,
For the use of a plugin in our project, I have installed the latest GCC
version (gcc-4.5-20100211)
and I configured it using the options:
--enable-languages=c,c++ --enable-plugin --prefix=/opt/<plugin>
Now after compiling the plugin, I get an error when linking:
cc1plus: error: Cannot load plugin ../libimo/libimo.so
/usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by ../libimo/libimo.so)
make: *** [default] Error 1
Browsing threads for similar problems, I read that a quick fix would be
to set the LD_LIBRARY_PATH to point to the directory where libstdc++ is
located, in my case
LD_LIBRARY_PATH=/usr/lib/libstdc++.so.6.0.13
LD_LIBRARY_PATH=/usr/lib/libstdc++.so.6
However, this did not solve the problem.
Any suggestions?
Best regards,
Tina
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Unable to get a plugin working
2010-02-13 1:26 Unable to get a plugin working Hristina Fidanoska
@ 2010-02-13 1:54 ` Ian Lance Taylor
0 siblings, 0 replies; 5+ messages in thread
From: Ian Lance Taylor @ 2010-02-13 1:54 UTC (permalink / raw)
To: Hristina Fidanoska; +Cc: gcc-help
Hristina Fidanoska <fidanconscious@googlemail.com> writes:
> For the use of a plugin in our project, I have installed the latest
> GCC version (gcc-4.5-20100211)
> and I configured it using the options:
>
> --enable-languages=c,c++ --enable-plugin --prefix=/opt/<plugin>
>
> Now after compiling the plugin, I get an error when linking:
>
> cc1plus: error: Cannot load plugin ../libimo/libimo.so
>
> /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by ../libimo/libimo.so)
>
> make: *** [default] Error 1
>
>
> Browsing threads for similar problems, I read that a quick fix would
> be to set the LD_LIBRARY_PATH to point to the directory where
> libstdc++ is located, in my case
>
> LD_LIBRARY_PATH=/usr/lib/libstdc++.so.6.0.13
>
> LD_LIBRARY_PATH=/usr/lib/libstdc++.so.6
LD_LIBRARY_PATH must include the name of a directory, not the name of
a file. That directory will be searched first for shared libraries.
In your case you want to set it to the directory where the newly built
libstdc++.so was installed. This will be somewhere under the --prefix
option you used when you configured gcc.
Ian
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Unable to get a plugin working
2010-02-15 9:46 ` Cedric Roux
@ 2010-02-16 0:35 ` Hristina Fidanoska
0 siblings, 0 replies; 5+ messages in thread
From: Hristina Fidanoska @ 2010-02-16 0:35 UTC (permalink / raw)
To: Cedric Roux; +Cc: gcc-help
Hello,
The code of the plugin does not contain a function "NodeFactory". If it
is a GCC function, I can not find it. Setting the LD_LIBRARY_PATH to
point to the directory where I installed libstdc++ did not have effect.
The plugin used to work though when I had an older Ubuntu 9.10 kernel
installed (the currently installed is 2.6.31).
I am not sure if it is a good idea to downgrade the kernel, it is like
an overkill, but if that is the only thing I could do to get the plugin
work, then I have to do it.
Are there any other good ideas/suggestion for solving the linker problem?
Regards,
Tina
On 02/15/2010 10:09 AM, Cedric Roux wrote:
> Hristina Fidanoska wrote:
>>
>> Hello,
>>
>> Last night I recompiled the GCC replacing it with a little bit older
>> version (gcc-4.5-20100121)
>> and the plugin still can not be loaded, but with a different error:
>>
>> cc1plus: error: Cannot load plugin ../libimo/libimo.so
>>
>> ../libimo/libimo.so: undefined symbol:
>> _ZN11NodeFactory10CreateNodeEN4BEEV4KindERKNS0_7ASTNodeES4_RKSt6vectorIS2_SaIS2_EE
>
>
> "c++filt
> _ZN11NodeFactory10CreateNodeEN4BEEV4KindERKNS0_7ASTNodeES4_RKSt6vectorIS2_SaIS2_EE"
>
> says
> NodeFactory::CreateNode(BEEV::Kind, BEEV::ASTNode const&,
> BEEV::ASTNode const&, std::vector<BEEV::ASTNode,
> std::allocator<BEEV::ASTNode> > const&)
>
> So the missing function is NodeFactory::CreateNode, whatever that is.
>
> if it is helpful in a way or another...
>
> (the _ZXXX name is a "mangled" name. In C++ the compiler encodes
> functions
> and methods this way because the name is not enough to identify a
> function/method,
> you need the parameters too.)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Unable to get a plugin working
2010-02-14 14:13 Hristina Fidanoska
@ 2010-02-15 9:46 ` Cedric Roux
2010-02-16 0:35 ` Hristina Fidanoska
0 siblings, 1 reply; 5+ messages in thread
From: Cedric Roux @ 2010-02-15 9:46 UTC (permalink / raw)
To: Hristina Fidanoska; +Cc: gcc-help
Hristina Fidanoska wrote:
>
> Hello,
>
> Last night I recompiled the GCC replacing it with a little bit older
> version (gcc-4.5-20100121)
> and the plugin still can not be loaded, but with a different error:
>
> cc1plus: error: Cannot load plugin ../libimo/libimo.so
>
> ../libimo/libimo.so: undefined symbol:
> _ZN11NodeFactory10CreateNodeEN4BEEV4KindERKNS0_7ASTNodeES4_RKSt6vectorIS2_SaIS2_EE
"c++filt _ZN11NodeFactory10CreateNodeEN4BEEV4KindERKNS0_7ASTNodeES4_RKSt6vectorIS2_SaIS2_EE"
says
NodeFactory::CreateNode(BEEV::Kind, BEEV::ASTNode const&, BEEV::ASTNode const&, std::vector<BEEV::ASTNode, std::allocator<BEEV::ASTNode> > const&)
So the missing function is NodeFactory::CreateNode, whatever that is.
if it is helpful in a way or another...
(the _ZXXX name is a "mangled" name. In C++ the compiler encodes functions
and methods this way because the name is not enough to identify a function/method,
you need the parameters too.)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Unable to get a plugin working
@ 2010-02-14 14:13 Hristina Fidanoska
2010-02-15 9:46 ` Cedric Roux
0 siblings, 1 reply; 5+ messages in thread
From: Hristina Fidanoska @ 2010-02-14 14:13 UTC (permalink / raw)
To: gcc-help
Hello,
Last night I recompiled the GCC replacing it with a little bit older
version (gcc-4.5-20100121)
and the plugin still can not be loaded, but with a different error:
cc1plus: error: Cannot load plugin ../libimo/libimo.so
../libimo/libimo.so: undefined symbol: _ZN11NodeFactory10CreateNodeEN4BEEV4KindERKNS0_7ASTNodeES4_RKSt6vectorIS2_SaIS2_EE
make: *** [default] Error 1
Now I have set the LD_LIBRARY_PATH to point to the directory my newly
installed libstdc++ is located (thank you for your hint!), but the
output above remains unchanged.
Would you suggest that I try to install again the newest GCC version
(for which I got a less cryptic error) or is there some workaround for
the current error?
After I would have reinstalled GCC, will I have to set the
LD_LIBRARY_PATH each time I try to link the plugin? Or is there a
long-term fix during the GCC compilation process to avoid these errors?
Best regards,
Tina
On 02/13/2010 02:51 AM, Ian Lance Taylor wrote:
> Hristina Fidanoska<fidanconscious@googlemail.com> writes:
>
>
>> For the use of a plugin in our project, I have installed the latest
>> GCC version (gcc-4.5-20100211)
>> and I configured it using the options:
>>
>> --enable-languages=c,c++ --enable-plugin --prefix=/opt/<plugin>
>>
>> Now after compiling the plugin, I get an error when linking:
>>
>> cc1plus: error: Cannot load plugin ../libimo/libimo.so
>>
>> /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by ../libimo/libimo.so)
>>
>> make: *** [default] Error 1
>>
>>
>> Browsing threads for similar problems, I read that a quick fix would
>> be to set the LD_LIBRARY_PATH to point to the directory where
>> libstdc++ is located, in my case
>>
>> LD_LIBRARY_PATH=/usr/lib/libstdc++.so.6.0.13
>>
>> LD_LIBRARY_PATH=/usr/lib/libstdc++.so.6
>>
> LD_LIBRARY_PATH must include the name of a directory, not the name of
> a file. That directory will be searched first for shared libraries.
>
> In your case you want to set it to the directory where the newly built
> libstdc++.so was installed. This will be somewhere under the --prefix
> option you used when you configured gcc.
>
> Ian
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-02-15 18:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-13 1:26 Unable to get a plugin working Hristina Fidanoska
2010-02-13 1:54 ` Ian Lance Taylor
2010-02-14 14:13 Hristina Fidanoska
2010-02-15 9:46 ` Cedric Roux
2010-02-16 0:35 ` Hristina Fidanoska
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).