This is the mail archive of the ecos-discuss@sourceware.cygnus.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

ecosconfig problems under HPUX


Hi again

The short version of this email is:
1. The "virtual memory exhausted" problem, that I experienced when building
ecosconfig under HPUX is solved. Details below.
2. A small part of the ecosconfig code (use af getcwd) does not work when
build under HPUX. Details and a fix below.

The long version: 

1. The "virtual memory exhausted" problem is solved.

Bart Veer (bartv@redhat.com)wrote:
> >>>>> "Hans" == Jepsen Hans Peter 
> <hans_peter_jepsen@Danfoss.com> writes:
> 
>     Hans> When I tried to build to ecosconfig under HPUX, the builds
>     Hans> dies when compiling libcdl/expr.cxx with the message
>     Hans> "virtual memory exhausted". Details below
> 
>     Hans> Compiler is c++ 2.95.2. By monitoring top's output, I can
>     Hans> see, that the compiler uses more that 60 Mb.
> 
>     Hans> How do I get rid of the problem? Any hints welcome.
> 
> libcdl is template-intensive, and g++ can need a lot of memory when
> compiling such code: 60MB+ is definitely possible. The gcc developers
> have addressed some memory usage issues in more recent snapshots, but
> new ones tend to crop up as well from time to time so I do not
> recommend that route. The best bet is to try to compile without
> optimization, i.e. remove the -O2. There is very little code in libcdl
> or the other host-side tools that is performance-critical.
> 
> Also, please note that AFAIK the host-side code has not yet been
> tested under HP-UX. None of the technical support contracts to date
> have specified this as a host platform.

The cure was to make the kernel parameter maxdsiz (Max Data Segment Size)
larger. Default is 64 MB. I set it to 128 MB. Watching top when compiling
the file, I saw the the largest value of SIZE was 77356K.

       - - -

2. A small part of the ecosconfig code does not work when build under HPUX. 

After successfully building ecosconfig, I had problems running the command
"ecosconfig tree".
I tracked the problem down to, that the line:
         char * cwd = getcwd (NULL, 0);
in src/tools/configtool/standalone/common/cdl_exec.cxx did not work.

When I replaced the line with
        char * cwd = getcwd (NULL, 1000);
        if (cwd == NULL)
        {
           perror("pwd");
           exit(1);
        }
the tree command works fine.

Btw, I do not like, that the return values from generate_build_tree

   bool generate_build_tree (. . . .) {
     . . .
     // create build and install directories to ensure they are in writable
locations
     if (! create_directory (build_dir))
             return false;
     if (! create_directory (install_dir + "/lib"))
             return false;
     if (! create_directory (install_dir + "/include/pkgconf"))
             return false;

are completely ignored by caller

   bool cdl_exec::cmd_tree () {
        . . .
        generate_build_tree (config, cwd, install_prefix);


Regards

Hans Peter

--
Hans Peter Jepsen          Phone: +45 74 88 50 11
Danfoss Drives A/S,        Fax:   +45 74 65 28 38
DG-253, Ulsnaes 1,         Email: Hans_Peter_Jepsen@danfoss.com
DK-6300 Graasten, Denmark  or:    hpj@computer.org

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]