eclipse development env compile error

English! place to talk about development, programming and coding
Post Reply
jayenho
Znuny newbie
Posts: 22
Joined: 24 Dec 2013, 10:29
Znuny Version: rel-3_3

eclipse development env compile error

Post by jayenho »

Hi, I am trying to setup an eclipse development env for otrs, after I have checked out the otrs framework source code, with auto build directly, I have encountered the below compiling error, any idea? I am a newbie for both perl and otrs, and will be very appreciated if any guy can lead me into the gate, thanks a lot in advanced.

Description
Bareword "GSS_C_NO_CREDENTIAL" not allowed while "strict subs" in use in GSSAPI.pm line 61

Resource
GSSAPI.pm

Path Location
/otrs/Kernel/cpan-lib/Authen/SASL/Perl

Type
Unknown Perl Problem

================================

Furthermore, even after I have added the corresponding package to the @INC, it still prompts compile error as below, I have idea why the @INC already mentioned the absolute path as /Kernel/Language, but it sill prompts "can't locate" error.

Description
Can't locate Kernel/Language.pm in @INC (@INC contains: C:/99_Jayenho/Repo/git/otrs/Kernel/Language C:/02_Installed/Perl64/site/lib C:/02_Installed/Perl64/lib)

Resource
Layout.pm

Path Location
/otrs/Kernel/Output/HTML line 15

Type
Perl Problem
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: eclipse development env compile error

Post by reneeb »

C:/99_Jayenho/Repo/git/otrs/Kernel/Language
is a wrong path in your @INC.

Add

Code: Select all

C:/99_Jayenho/Repo/git/otrs/
and

Code: Select all

C:/99_Jayenho/Repo/git/otrs/Kernel/cpan-lib
to your @INC
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
jayenho
Znuny newbie
Posts: 22
Joined: 24 Dec 2013, 10:29
Znuny Version: rel-3_3

Re: eclipse development env compile error

Post by jayenho »

reneeb wrote:
C:/99_Jayenho/Repo/git/otrs/Kernel/Language
is a wrong path in your @INC.

Add

Code: Select all

C:/99_Jayenho/Repo/git/otrs/
and

Code: Select all

C:/99_Jayenho/Repo/git/otrs/Kernel/cpan-lib
to your @INC
Terribly appreciated for your so kindly reply. I have fixed this @INC issue, however, after the otrs framework checked out, during the compiling, it is referring to the Kernel/Config.pm file, but for the source code level, it only exists a file named "Kernel/Config.pm.dist", can I just simply copy and paste it and rename it as "Kernel/Config.pm" directly? any configuration else I should be aware of?
jayenho
Znuny newbie
Posts: 22
Joined: 24 Dec 2013, 10:29
Znuny Version: rel-3_3

Re: eclipse development env compile error

Post by jayenho »

jayenho wrote:
reneeb wrote:
C:/99_Jayenho/Repo/git/otrs/Kernel/Language
is a wrong path in your @INC.

Add

Code: Select all

C:/99_Jayenho/Repo/git/otrs/
and

Code: Select all

C:/99_Jayenho/Repo/git/otrs/Kernel/cpan-lib
to your @INC
Terribly appreciated for your so kindly reply. I have fixed this @INC issue, however, after the otrs framework checked out, during the compiling, it is referring to the Kernel/Config.pm file, but for the source code level, it only exists a file named "Kernel/Config.pm.dist", can I just simply copy and paste it and rename it as "Kernel/Config.pm" directly? any configuration else I should be aware of?
I checked the official doc of OTRS, it should be fine if just renaming it. Anyway, thank you very much.
jayenho
Znuny newbie
Posts: 22
Joined: 24 Dec 2013, 10:29
Znuny Version: rel-3_3

Re: eclipse development env compile error

Post by jayenho »

jayenho wrote:
reneeb wrote:
C:/99_Jayenho/Repo/git/otrs/Kernel/Language
is a wrong path in your @INC.

Add

Code: Select all

C:/99_Jayenho/Repo/git/otrs/
and

Code: Select all

C:/99_Jayenho/Repo/git/otrs/Kernel/cpan-lib
to your @INC
Terribly appreciated for your so kindly reply. I have fixed this @INC issue, however, after the otrs framework checked out, during the compiling, it is referring to the Kernel/Config.pm file, but for the source code level, it only exists a file named "Kernel/Config.pm.dist", can I just simply copy and paste it and rename it as "Kernel/Config.pm" directly? any configuration else I should be aware of?
I have encountered below strange question while using the EPIC, and then I tried to use command line with perl directly, it throws the same error as well, any idea?

C:\99_Jayenho\Repo\git\otrs\Kernel\System\Web>perl -c InterfacePublic.pm
Undefined subroutine &Encode::find_encoding called at C:/02_Installed/Perl64/lib
/Encode/Locale.pm line 83.
Compilation failed in require at C:/99_Jayenho/Repo/git/otrs/Kernel/System/Encod
e.pm line 16.
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: eclipse development env compile error

Post by reneeb »

What version of Encode did you install? Run

Code: Select all

perl -MEncode -e "print Encode->VERSION"
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
jayenho
Znuny newbie
Posts: 22
Joined: 24 Dec 2013, 10:29
Znuny Version: rel-3_3

Re: eclipse development env compile error

Post by jayenho »

reneeb wrote:What version of Encode did you install? Run

Code: Select all

perl -MEncode -e "print Encode->VERSION"
C:\Users\jayhe>perl -MEncode -e "print Encode->VERSION"
2.49

Actually, I have used the most recent ActiveState's windows installation package directly, that is, "ActivePerl-5.16.3.1603-MSWin32-x64-296746.msi", and also checked the PPM with version 2.49 Encode installed. However, for the EPIC plugin for eclipse, I have used the most recent testing one, that is, "http://e-p-i-c.sf.net/updates/testing", instead of the stable and older release version, is it related?
jayenho
Znuny newbie
Posts: 22
Joined: 24 Dec 2013, 10:29
Znuny Version: rel-3_3

Re: eclipse development env compile error

Post by jayenho »

Seems very odd to use epic plugin for the otrs integration development, with the command line perl -c for compile, for those pl/pm/t files with compilation ok, it still encounters eclipse build error in the IDE.
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: eclipse development env compile error

Post by reneeb »

What are the error messages now?
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
jayenho
Znuny newbie
Posts: 22
Joined: 24 Dec 2013, 10:29
Znuny Version: rel-3_3

Re: eclipse development env compile error

Post by jayenho »

reneeb wrote:What are the error messages now?
Still many, but very odd that for those utf-8 encoding error as below screen capture, using command line perl -c works at all, the content is directly downloaded from the otrs github, I have access it with browser too, the encoding error is really there, i.e. line 292 of https://github.com/OTRS/otrs/blob/rel-3 ... /Process.t

And very odd that you can see from the below pic, the line 292 has compiling error, but line 296 has no such error, they both should encounter the encoding error as I think, but using command line perl -c Process.t can pass smoothly, why?
You do not have the required permissions to view the files attached to this post.
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: eclipse development env compile error

Post by reneeb »

That's really odd. Can you check if it works when you change line 292 to

Code: Select all

'Process-' . $RandomID . '-äöüßÄÖÜ€исáéíúóúÁÉÍÓÚñÑ'
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
jayenho
Znuny newbie
Posts: 22
Joined: 24 Dec 2013, 10:29
Znuny Version: rel-3_3

Re: eclipse development env compile error

Post by jayenho »

reneeb wrote:That's really odd. Can you check if it works when you change line 292 to

Code: Select all

'Process-' . $RandomID . '-äöüßÄÖÜ€исáéíúóúÁÉÍÓÚñÑ'
Ooops, it really works for this change, no idea the rationale behind, but it finally works anyway, thank you very much, let me check the remaining compiling error then.
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: eclipse development env compile error

Post by reneeb »

jayenho wrote:Ooops, it really works for this change, no idea the rationale behind, [..]
I have no idea, too ;-) But that was the only difference between the lines that had the error and the one that were ok.

It would be interesting to know if this is an Eclipse/EPIC error or if one can reproduce such an error in a plain Perl environment.
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
jayenho
Znuny newbie
Posts: 22
Joined: 24 Dec 2013, 10:29
Znuny Version: rel-3_3

Re: eclipse development env compile error

Post by jayenho »

reneeb wrote:
jayenho wrote:Ooops, it really works for this change, no idea the rationale behind, [..]
I have no idea, too ;-) But that was the only difference between the lines that had the error and the one that were ok.

It would be interesting to know if this is an Eclipse/EPIC error or if one can reproduce such an error in a plain Perl environment.
Yap, you mean the usage of double quotation mark and single quotation mark may result in different behavior in the EPIC platform, I guess so, anyway, thanks a lot and let me keep focusing on remaining error then.
jayenho
Znuny newbie
Posts: 22
Joined: 24 Dec 2013, 10:29
Znuny Version: rel-3_3

Re: eclipse development env compile error

Post by jayenho »

Now I am encountering another compiling error, in the script "otrs/scripts/apache2-perl-startup.pl", it will firstly referring to an apache lib as below,

Code: Select all

use Apache2::RequestRec;
use ModPerl::Util;
However, I can not grep any source of "Apache2::RequestRec" (package as "mod_perl") from the search CPAN website at all, and I also checked the downloaded file "mod_perl-2.0.8.tar.gz" from other website, and also can not grep the file about "Apache2::RequestRec" as well. I know that this should be related to the apache web server related, but from the point view of eclipse development workspace, how can I bypass it? And even if I have the apache web server installed, what else can I do to get this file work as expected?
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: eclipse development env compile error

Post by reneeb »

If you want to workaround it, you could create a directory (outside the OTRS project) and include that directory in your @INC paths. Then you create these files in that directory:

RequestRec.pm in subdirectory Apache2:

Code: Select all

package Apache2::RequestRec;

1;
Util.pm in subdirectory ModPerl:

Code: Select all

package ModPerl::Util;

1;
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
jayenho
Znuny newbie
Posts: 22
Joined: 24 Dec 2013, 10:29
Znuny Version: rel-3_3

Re: eclipse development env compile error

Post by jayenho »

reneeb wrote:If you want to workaround it, you could create a directory (outside the OTRS project) and include that directory in your @INC paths. Then you create these files in that directory:

RequestRec.pm in subdirectory Apache2:

Code: Select all

package Apache2::RequestRec;

1;
Util.pm in subdirectory ModPerl:

Code: Select all

package ModPerl::Util;

1;
I know this workaround, however, it seems that OTRS framework couples with the apache web server quite tightly, and I have also googled and found out that strawberry perl can handle this issue, while e-pic is officially recommending activestate perl but ppm obsolete the support to "mod_perl" directly, I tried the CPAN to download the "mod_perl" package, and also tried to install it with cygwin perl instead, however, it needs to compile and install the apache firstly with apxs support, oh, so complicated...
jayenho
Znuny newbie
Posts: 22
Joined: 24 Dec 2013, 10:29
Znuny Version: rel-3_3

Re: eclipse development env compile error

Post by jayenho »

I have resolved it by referring to the below info:

http://www.apachelounge.com/viewtopic.php?p=25858
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: eclipse development env compile error

Post by reneeb »

jayenho wrote:I know this workaround, however, it seems that OTRS framework couples with the apache web server quite tightly,
No, but the startup.pl is made for Apache. The rest of the code is webserver independent. You can use other webserver as well (e.g. I run it with Starman behind a nginx proxy).
jayenho wrote: and I have also googled and found out that strawberry perl can handle this issue, while e-pic is officially recommending activestate perl but ppm obsolete the support to "mod_perl" directly, I tried the CPAN to download the "mod_perl" package, and also tried to install it with cygwin perl instead, however, it needs to compile and install the apache firstly with apxs support, oh, so complicated...
Yes, compiling mod_perl yourself is not the easiest job... However, if you just do development on your machine, I would do the workaround.

This might be helpful as well: http://strawberryperl.com/package/kmx/m ... ME-512.TXT
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
jayenho
Znuny newbie
Posts: 22
Joined: 24 Dec 2013, 10:29
Znuny Version: rel-3_3

Re: eclipse development env compile error

Post by jayenho »

reneeb wrote:
jayenho wrote:I know this workaround, however, it seems that OTRS framework couples with the apache web server quite tightly,
No, but the startup.pl is made for Apache. The rest of the code is webserver independent. You can use other webserver as well (e.g. I run it with Starman behind a nginx proxy).
jayenho wrote: and I have also googled and found out that strawberry perl can handle this issue, while e-pic is officially recommending activestate perl but ppm obsolete the support to "mod_perl" directly, I tried the CPAN to download the "mod_perl" package, and also tried to install it with cygwin perl instead, however, it needs to compile and install the apache firstly with apxs support, oh, so complicated...
Yes, compiling mod_perl yourself is not the easiest job... However, if you just do development on your machine, I would do the workaround.

This might be helpful as well: http://strawberryperl.com/package/kmx/m ... ME-512.TXT
Noted with many thanks.
Post Reply