Compiling error message I can't figure out.


Results 1 to 4 of 4

Thread: Compiling error message I can't figure out.

  1. #1
    Join Date
    Oct 2002
    Location
    Binghamton NY
    Posts
    2,435

    Compiling error message I can't figure out.

    Usually when a compile doesn't work, the error message indicates a missing dependancy, and it's pretty straightforward. This came up while trying to install arts-1.5.10 for KDE 3.5. Can anybody help me?


    Code:
    mcoputils.cc:74: error: 'PATH_MAX' was not declared in this scope
    mcoputils.cc:91: error: 'kde_tmp_dir' was not declared in this scope
    mcoputils.cc:100: error: 'user_tmp_dir' was not declared in this scope
    mcoputils.cc: In function 'int build_link(const char*, const char*)':
    mcoputils.cc:227: error: 'PATH_MAX' was not declared in this scope
    mcoputils.cc:236: error: 'kde_tmp_dir' was not declared in this scope
    mcoputils.cc:245: error: 'user_tmp_dir' was not declared in this scope
    mcoputils.cc:321: error: 'tmp_buf' was not declared in this scope
    mcoputils.cc: In static member function 'static std::string Arts::MCOPUtils::createFilePath(std::string)':
    mcoputils.cc:367: error: 'PATH_MAX' was not declared in this scope
    mcoputils.cc:368: error: 'tmp_prefix' was not declared in this scope
    make[3]: *** [mcoputils.lo] Error 1
    make[3]: Leaving directory `/home/dushku/Desktop/arts-1.5.10/mcop'
    make[2]: *** [all] Error 2
    make[2]: Leaving directory `/home/dushku/Desktop/arts-1.5.10/mcop'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/dushku/Desktop/arts-1.5.10'
    make: *** [all] Error 2
    dushku@dushku-desktop:~/Desktop/arts-1.5.10$

  2. #2
    Join Date
    Oct 2002
    Location
    Republic of Texas
    Posts
    5,898
    That reminds me of the stuff you see when using a newer gcc that is more strict. Older code sometimes fails to compile because of this new strictness.
    Need help in realtime? Visit us at #linuxnewbie on irc.libera.chat

    Few of us will do as much for our fellow man as he has done.
    --Andrew Morton on RMS

  3. #3
    Join Date
    Jan 2003
    Posts
    1,012
    arts depends on qt3, so a wag says your qt3 install is incomplete/incorrect?
    You can tuna piano, but you can't tune a fish.

    http://www.lunar-linux.org/
    It's worth the spin.

    http://www.pclinuxos.com/page.php?7
    Puts the rest to shame.

  4. #4
    Join Date
    Apr 2001
    Location
    SF Bay Area, CA
    Posts
    14,936
    Are there more errors before that? Scroll back in the terminal if you haven't already checked. With compile errors, you need to start at the first error, not the last few.

    (If the first error is a missing include file, this will very likely be the only thing you need to fix, for instance.)

    Assuming there are no more errors before that, I'd assume the problem is the missing PATH_MAX. (The other missing symbols are probably defined using PATH_MAX, and when the compiler got the error that PATH_MAX was not defined, it skipped the definition of these other symbols as well.)

    On my system, PATH_MAX is in <linux/limits.h>, though that file generally should not be included directly. You might be able to find it with <limits.h> but it would depend on your compiler and glibc version. If this file (mcoputils.cc) includes <limits.h>, then this is not the problem (unless the compiler complains higher up about not being able to find the file).

Posting Permissions

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