Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Compilation failed

Help
doug
2007-05-01
2013-05-20
  • doug
    doug
    2007-05-01

    System=MacOSX 10.4.9
    Eclipse SDK Version: 3.2.2
    Epic 0.5.3.5

    I imported some perl files from my solaris box.  This test program works at the command line on my mac but fails within Eclipse on the mac at the "Use Sybase::CTlib" command.  Why is that?

    #!/usr/local/bin/perl -w
    #
    #    @(#)ct_sql.pl    1.2    8/7/95

    use Sybase::CTlib; 

    $d = new Sybase::CTlib dsur, password, sybtest1;

    # ct_sql() returns a 'reference' to an array:
    $ref = $d->ct_sql("select * from hss..aaa");

    foreach $line (@$ref)    # 'de-reference' the pointer
    {
        print "@$line\n";
    }

    # We can also pass a subroutine as the second argument to ct_sql(), and
    # it will be called with each row:

    sub print_sql {
        print "@_\n";
    }

    $ref = $d->ct_sql( "select * from master..sysprocesses", \&print_sql );

    # This time $ref does not point to the results array, because each row
    # has been handled by the "callback" proc &print_sql().

    # This same call can also be written using an 'anonymous' sub:

    $ref =
      $d->ct_sql( "select * from master..sysprocesses", sub { print "@_\n"; } );

    ERROR:
    Can't load '/Library/Perl/5.8.6/darwin-thread-multi-2level/auto/Sybase/CTlib/CTlib.bundle' for module Sybase::CTlib: dlopen(/Library/Perl/5.8.6/darwin-thread-multi-2level/auto/Sybase/CTlib/CTlib.bundle, 1): Library not loaded: libsybct_r.dylib
      Referenced from: /Library/Perl/5.8.6/darwin-thread-multi-2level/auto/Sybase/CTlib/CTlib.bundle
      Reason: image not found at /System/Library/Perl/5.8.6/darwin-thread-multi-2level/DynaLoader.pm line 230.
    at /Users/dsur/Documents/workspace/cdr_adt/test2.pl line 6
    Compilation failed in require at /Users/dsur/Documents/workspace/cdr_adt/test2.pl line 6.
    at /Users/dsur/Documents/workspace/cdr_adt/test2.pl line 6
        main::BEGIN() called at /Library/Perl/5.8.6/darwin-thread-multi-2level/Sybase/CTlib.pm line 6
        eval {...} called at /Library/Perl/5.8.6/darwin-thread-multi-2level/Sybase/CTlib.pm line 6
    BEGIN failed--compilation aborted at /Users/dsur/Documents/workspace/cdr_adt/test2.pl line 6.
    at /Users/dsur/Documents/workspace/cdr_adt/test2.pl line 6

     
    • Jan Ploski
      Jan Ploski
      2007-05-01

      Enable debugger console in preferences to have the invocation of Perl done by EPIC logged (in the "Error Log" view and workspace/.metadata/.log). Compare what is different between command-line execution and Eclipse execution. Command line, working directory and environment variables might all be relevant.

       
    • doug
      doug
      2007-05-01

      The "Error Log" is error you see in my original post.  The .metadata/.log file seems to have the following errors (none of which seems to indicate any environment issues):

      [cc62a:~/documents/workspace/.metadata] dsur% more .log
      !SESSION 2007-04-30 14:16:18.022 -----------------------------------------------
      eclipse.buildId=M20070212-1330
      java.version=1.5.0_07
      java.vendor=Apple Computer, Inc.
      BootLoader constants: OS=macosx, ARCH=ppc, WS=carbon, NL=en_US
      Framework arguments:  -keyring /Users/dsur/.eclipse_keyring -showlocation
      Command-line arguments:  -os macosx -ws carbon -keyring /Users/dsur/.eclipse_keyring -consoleLog -showlocation

      !ENTRY org.eclipse.update.core 4 0 2007-04-30 14:25:55.445
      !MESSAGE Unable to retrieve remote reference "http://e-p-i-c.sf.net/updates/features/org.epic.feature.main_0.3.0.jar". [Server returne
      d HTTP response code: "404 Not Found" for URL: http://e-p-i-c.sf.net/updates/features/org.epic.feature.main_0.3.0.jar.\]
      !STACK 0
      org.eclipse.update.internal.core.FatalIOException: Server returned HTTP response code: "404 Not Found" for URL: http://e-p-i-c.sf.net/
      updates/features/org.epic.feature.main_0.3.0.jar.
              at org.eclipse.update.internal.core.UpdateManagerUtils.checkConnectionResult(UpdateManagerUtils.java:561)
              at org.eclipse.update.core.ContentReference.getInputStream(ContentReference.java:153)
              at org.eclipse.update.core.FeatureContentProvider.asLocalReference(FeatureContentProvider.java:268)
              at org.eclipse.update.internal.core.FeaturePackagedContentProvider.getFeatureEntryArchiveReferences(FeaturePackagedContentProv
      ider.java:157)
              at org.eclipse.update.internal.core.FeaturePackagedContentProvider.getFeatureManifestReference(FeaturePackagedContentProvider.
      java:83)
              at org.eclipse.update.internal.core.FeaturePackagedFactory.createFeature(FeaturePackagedFactory.java:39)
              at org.eclipse.update.core.Site.createFeature(Site.java:527)
              at org.eclipse.update.core.FeatureReference.createFeature(FeatureReference.java:122)
              at org.eclipse.update.core.FeatureReference.getFeature(FeatureReference.java:110)
              at org.eclipse.update.core.FeatureReference.getFeature(FeatureReference.java:97)
              at org.eclipse.update.internal.search.SiteSearchCategory$FeatureDownloader.run(SiteSearchCategory.java:226)
              at java.lang.Thread.run(Thread.java:613)
      !SESSION 2007-04-30 14:27:59.599 -----------------------------------------------
      eclipse.buildId=M20070212-1330
      java.version=1.5.0_07
      java.vendor=Apple Computer, Inc.
      BootLoader constants: OS=macosx, ARCH=ppc, WS=carbon, NL=en_US
      Framework arguments:  -keyring /Users/dsur/.eclipse_keyring -showlocation
      Command-line arguments:  -os macosx -ws carbon -keyring /Users/dsur/.eclipse_keyring -consoleLog -showlocation

      !ENTRY org.eclipse.osgi 2 1 2007-04-30 15:00:47.510
      !MESSAGE NLS unused message: javaCommentTaskTags in: org.epic.perleditor.preferences.PreferencesMessages

      !ENTRY org.eclipse.osgi 2 1 2007-04-30 15:00:47.511
      !MESSAGE NLS unused message: codeAssist in: org.epic.perleditor.preferences.PreferencesMessages

      !ENTRY org.eclipse.osgi 2 1 2007-04-30 15:00:47.512
      !MESSAGE NLS unused message: matchingBracketsHighlightColor2 in: org.epic.perleditor.preferences.PreferencesMessages

      !ENTRY org.eclipse.osgi 2 1 2007-04-30 15:00:47.549
      !MESSAGE NLS unused message: findScopeColor2 in: org.epic.perleditor.preferences.PreferencesMessages

      !ENTRY org.eclipse.osgi 2 1 2007-04-30 15:00:47.550
      !MESSAGE NLS unused message: linkedPositionColor2 in: org.epic.perleditor.preferences.PreferencesMessages

      !ENTRY org.eclipse.osgi 2 1 2007-04-30 15:00:47.552
      !MESSAGE NLS unused message: linkColor2 in: org.epic.perleditor.preferences.PreferencesMessages

      !ENTRY org.eclipse.osgi 2 1 2007-04-30 15:00:47.555
      !MESSAGE NLS unused message: synchronizeOnCursor in: org.epic.perleditor.preferences.PreferencesMessages

      !ENTRY org.eclipse.osgi 2 1 2007-04-30 15:00:47.557
      !MESSAGE NLS missing message: completionInserts in: org.epic.perleditor.preferences.PreferencesMessages

      !ENTRY org.eclipse.osgi 2 1 2007-04-30 15:00:47.559
      !MESSAGE NLS missing message: completionOverwrites in: org.epic.perleditor.preferences.PreferencesMessages
      !SESSION 2007-05-01 13:46:25.515 -----------------------------------------------
      eclipse.buildId=M20070212-1330
      java.version=1.5.0_07
      java.vendor=Apple Computer, Inc.
      BootLoader constants: OS=macosx, ARCH=ppc, WS=carbon, NL=en_US
      Framework arguments:  -keyring /Users/dsur/.eclipse_keyring -showlocation
      Command-line arguments:  -os macosx -ws carbon -keyring /Users/dsur/.eclipse_keyring -consoleLog -showlocation

      !ENTRY org.eclipse.osgi 2 1 2007-05-01 14:02:06.804
      !MESSAGE NLS unused message: javaCommentTaskTags in: org.epic.perleditor.preferences.PreferencesMessages

      !ENTRY org.eclipse.osgi 2 1 2007-05-01 14:02:06.837
      !MESSAGE NLS unused message: codeAssist in: org.epic.perleditor.preferences.PreferencesMessages

      !ENTRY org.eclipse.osgi 2 1 2007-05-01 14:02:06.839
      !MESSAGE NLS unused message: matchingBracketsHighlightColor2 in: org.epic.perleditor.preferences.PreferencesMessages

      !ENTRY org.eclipse.osgi 2 1 2007-05-01 14:02:06.841
      !MESSAGE NLS unused message: findScopeColor2 in: org.epic.perleditor.preferences.PreferencesMessages

      !ENTRY org.eclipse.osgi 2 1 2007-05-01 14:02:06.844
      !MESSAGE NLS unused message: linkedPositionColor2 in: org.epic.perleditor.preferences.PreferencesMessages

      !ENTRY org.eclipse.osgi 2 1 2007-05-01 14:02:06.846
      !MESSAGE NLS unused message: linkColor2 in: org.epic.perleditor.preferences.PreferencesMessages

      !ENTRY org.eclipse.osgi 2 1 2007-05-01 14:02:06.849
      !MESSAGE NLS unused message: synchronizeOnCursor in: org.epic.perleditor.preferences.PreferencesMessages

      !ENTRY org.eclipse.osgi 2 1 2007-05-01 14:02:06.851
      !MESSAGE NLS missing message: completionInserts in: org.epic.perleditor.preferences.PreferencesMessages

      !ENTRY org.eclipse.osgi 2 1 2007-05-01 14:02:06.853
      !MESSAGE NLS missing message: completionOverwrites in: org.epic.perleditor.preferences.PreferencesMessages
      [cc62a:~/documents/workspace/.metadata] dsur% 

       
      • Jan Ploski
        Jan Ploski
        2007-05-01

        The idea was for you to first enable the debug console in preferences, then run the script in debug mode and THEN look into the error log to see how the Perl script is invoked. This information is missing in the pasted log.

         
    • doug
      doug
      2007-05-02

      Ok, I understand Jan.  Well the Eclipse environment vars are definitely a subset of what I have in my command line mode.  I launched the Eclipse app via the Mac file browser by double-clicking on the icon.  I guess it brings up some default shell to run Eclipse. This default shell does not call my default .cshrc files and thus the environments vars are not set correctly.

      If I open a terminal, where all my proper environment vars are set, and launch the Eclipse app there via the "open Eclipse.app" command, I notice all the proper  environment vars are set and the program runs correctly.

      The question now is what is the best way to fix this?
      1) Modify some default environment settings in Eclipse?
      2) Modify the default shell
      3) Launch Eclipse from a shell (Mac Terminal) where all my environment are set correctly.

      Any suggestions would be appreciated. 

      -Doug

       
      • Jan Ploski
        Jan Ploski
        2007-05-02

        No experience with Mac, sorry. I think you should be able to solve it at the OS level without modifying anything in Eclipse, though.

         
        • Jae Gangemi
          Jae Gangemi
          2007-05-03

          i have a mac - if you want environment variables to be exposed to applications that you launch via the gui (as opposed to command line), you need to stick them in the ~/.MacOSX/environment.plist file.

          this link should tell you all you need to know - http://snippets.dzone.com/posts/show/586