×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Feb 2008
    Posts
    12

    Another make (e=87) error

    Hello to all,

    I'm trying to compile a static DLL for the S60 FP1 platform. However, when "make" calls "GCCE.make" it returns an error. Concretely, it says:

    process_begin: CreateProcess( ...)
    make (e=87): El parámetro no es correcto (Spanish for "incorrect parameter)

    The code of the DLL is quite big (more or less 187,000 lines of code excluding comments) and is thus split into several files. In fact, 265 object files are generated.

    I've been searching about this problem, and I have found that it has to do with the number of files, but I cannot change that -I'm just porting the application-.

    Any clues about what is happening?

    Thanks you very much,

    Javier
    Last edited by jmpep; 2008-10-10 at 01:27.

  2. #2
    Registered User
    Join Date
    Feb 2008
    Posts
    12

    Re: Another make (e=87) error

    Ok. I have "fixed" the problem by using a different location for my files. Since it is hard to find documentation about it, here it comes the technical explanation of why it happens and how to work around it.

    The problem

    Make uses the function CreateProcess to create the processes in which it executes applications, when in Windows (this can be seen in the file sub_proc.c of the make source code).

    According to the MSDN (http://msdn.microsoft.com/en-us/library/ms682425.aspx):

    "lpCommandLine. The command line to be executed. The maximum length of this string is 32,768 characters, including the Unicode terminating null character"

    This is the reason why the error "incorrect parameter" is returned by make when it has to execute the linker and pass the entire list of object files in the lpCommandLine parameter.

    The workaround
    There isn't. The only thing that can be done is to ensure that the list of all the object files including their paths won't be so large. In order to do so, keeping small filenames / directories and short paths is the key.

    Maybe it would be a good idea for the Carbide/SDK developers to have this into account and think of a way of passing the list of objects files to linker other than by command line.
    Last edited by jmpep; 2008-10-10 at 01:31.

  3. #3
    Registered User
    Join Date
    Feb 2008
    Posts
    12

    Re: Another make (e=87) error

    Well, there IS a workaround -but I cannot think of anyone desperate enough to use it-.

    The problem is related with the number of object files sent to the linker, so reducing this would solve the problem.

    An easy -and ugly- way of reducing the number of object files is by having just one source file that includes -by using #include- all the other *.cpp files. By compiling only one source file, a unique object file will be generated, so no problem will arise.

  4. #4
    Registered User
    Join Date
    Aug 2009
    Posts
    1

    Re: Another make (e=87) error

    (Posting for future searchers, I know the thread is way old)

    Yes, the command line is too long. If moving the code to a shorter path is not enough, you can patch the sdk a little. I was
    forced to do so.

    epoc32/tools/cl_bpabi.pm (on 3.2) was quick-and-dirty-patched thus:

    Code:
    831c831
    <
    ---
    >     my $two_lines_of_objects = 0;
    1005a1006,1012
    >
    >         #todo: maybe make this hack better by making a list of lists to support more than 2 lines :P
    >         my $antal = scalar @SrcList / 2;
    >         $antal = 100 if $antal<100;
    >
    >         my $cur = 0;
    >
    1006a1014,1022
    >             if (!$two_lines_of_objects  && $cur++ > $antal)
    >             {
    >             $two_lines_of_objects = 1;
    >             print STDOUT "info: so many files. making two lines of .o's in makefile\n";
    >
    >                 &main::Output(
    >                     "\nOBJECTS$Bld"."2="
    >                 );
    >             }
    1045a1062
    >
    1046a1064,1067
    >         if ($two_lines_of_objects)
    >              {
    >              &main::Output(" \$(OBJECTS$Bld"."2".")" );
    >              }
    1433a1455,1475
    >         if ($two_lines_of_objects  == 1 && not $viaoption)
    >             {
    >             #do one more
    >             &main::Output(
    >                       "\t\$(AR) ",
    >                               " \$(ARCHIVER_CREATE_OPTION) ",
    >                               " \$(EPOCSTATLINK$Bld)\\$Trg \\\n"
    >                       );
    >             # Pass in the command file if the command file option is passed in
    >             if($viaoption) {
    >                 &main::Output(
    >                     "\t\t\$(COMMANDFILE_OPTION) "," $objectsViaFile\n"
    >                 );
    >             }
    >             else {
    >                 printf STDOUT "$OBJECTSUREL\n";
    >                 &main::Output(
    >                     "\t\t\$(OBJECTS$Bld"."2".") \n"
    >                 );
    >             }
    Not very pretty as you can see. But it did the trick.
    It splits the line of object files in two and makes it run the archiver in two steps.
    Could easily be applied to 5.0 and whatnot, manually.

  5. #5
    Registered User
    Join Date
    Oct 2010
    Posts
    38

    Re: Another make (e=87) error

    I've run into this problem. thanks for posting the solution, but are those numbers line numbers where I supposed to paste the code in?

  6. #6
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,734

    Re: Another make (e=87) error

    I guess this is some kind of diff (http://en.wikipedia.org/wiki/Diff)
    It is not necessarily present on a 'generic' Windows config, but you actually have one in the SDK: epoc32\gcc\bin\diff.exe, so try that one first prior to downloading various tools.

  7. #7
    Registered User
    Join Date
    Oct 2010
    Posts
    38

    Re: Another make (e=87) error

    I can't find version 3.2 on the web though. Any idea where should I look? Thanks!

  8. #8
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,734

    Re: Another make (e=87) error

    That 3.2 probably means S60 3.2 (S60 3rd FP2).

  9. #9
    Registered User
    Join Date
    Oct 2010
    Posts
    38

    Re: Another make (e=87) error

    Quote Originally Posted by wizard_hu_ View Post
    That 3.2 probably means S60 3.2 (S60 3rd FP2).
    thanks .

  10. #10
    Registered User
    Join Date
    Oct 2010
    Posts
    38

    Re: Another make (e=87) error

    for anyone who runs into the problem, here's what worked for me:

    find your cl_bpabi.pm file (it's under C:\S60\devices\S60_5th_Edition_SDK_v1.0\epoc32\tools in my case), search for "\t\t\$(OBJECTS$Bld) \\\n" and replace it with "\t\t\"\$(EPOCBLD$Bld)\\*.o\" \\\n"


    reference: http://discussion.forum.nokia.com/fo...757#post665757

Similar Threads

  1. XMl Parser Implementation for Symbian
    By ittiam in forum Symbian
    Replies: 26
    Last Post: 2009-09-16, 05:26
  2. error including vector
    By Lichtens in forum Open C/C++
    Replies: 5
    Last Post: 2009-04-03, 14:19
  3. carbide build problem help please
    By berkcekisbas in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2006-09-26, 19:41
  4. camera app compilation problems
    By basarim in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2003-12-31, 18:16
  5. how to avoid linking error
    By skdas in forum Symbian
    Replies: 6
    Last Post: 2003-07-07, 07:57

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×