Opened 11 years ago

Last modified 11 years ago

#5937 assigned Bugs

Sun C++ 5.11 Linux compilation errors: operations.cpp

Reported by: Peter Loibl <boost@…> Owned by: Beman Dawes
Milestone: To Be Determined Component: filesystem
Version: Boost 1.47.0 Severity: Problem
Keywords: Cc:

Description

CC: Sun C++ 5.11 Linux_i386 2010/08/13 usage: CC [ options ] files. Use 'CC -flags' for details

"libs/filesystem/v3/src/operations.cpp", line 1760: Error: DT_UNKNOWN is not defined.

"libs/filesystem/v3/src/operations.cpp", line 1766: Error: DT_DIR is not defined.

"libs/filesystem/v3/src/operations.cpp", line 1768: Error: DT_REG is not defined.

"libs/filesystem/v3/src/operations.cpp", line 1770: Error: DT_LNK is not defined.

4 Error(s) detected.

"CC" -library=stlport4 -xO4 -mt -erroff=%none -m64 -DBOOST_ALL_NO_LIB=1 -DBOOST_SYSTEM_STATIC_LINK=1 -DNDEBUG -I"." -c -o "/home/pal/work/cpp/tmp/boost/bin.v2/libs/filesystem/build/sun/release/address-model-64/link-static/stdlib-sun-stlport/threading-multi/v3/src/operations.o" "libs/filesystem/v3/src/operations.cpp"

Attachments (4)

usr_include_dirent.h (11.0 KB ) - added by Peter Loibl <boost@…> 11 years ago.
dirent.h
features.h (12.2 KB ) - added by Peter Loibl <boost@…> 11 years ago.
features.h
operations.i.gz (108.6 KB ) - added by Peter Loibl <boost@…> 11 years ago.
C-Preprocessor output (gzipped)
compilers (11.0 KB ) - added by Peter Loibl <boost@…> 11 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 by Peter Loibl <boost@…>, 11 years ago

Component: Nonefilesystem
Owner: set to Beman Dawes

comment:2 by Beman Dawes, 11 years ago

Status: newassigned

The implication of those error messages is that something is really whacky about your dirent.h

I need to see the contents of dirent.h for the library you are using. Please either send me a copy or post a link to somewhere I can view it.

Thanks,

--Beman

in reply to:  2 ; comment:3 by Peter Loibl <boost@…>, 11 years ago

Hi!

No problem. I attached the header file. Looking into the header file, it seems that the features.h file might be of interest as well. Is my assumption correct, that the function that you are using is the readdir() function is this context? If yes, then the man page for readdir() gives the following hint:

   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

       readdir_r():
           _POSIX_C_SOURCE >= 1 || _XOPEN_SOURCE || _BSD_SOURCE ||
           _SVID_SOURCE || _POSIX_SOURCE

I also attached the output that the pre-processor is generating The output of the pre-processor has been created with the following command:

CC -E -library=stlport4 -xO4 -mt -erroff=%none -m64 -DBOOST_ALL_NO_LIB=1 -DBOOST_SYSTEM_STATIC_LINK=1 -DNDEBUG -I"." libs/filesystem/v3/src/operations.cpp > ../operations.i

Cheers, Peter Loibl

by Peter Loibl <boost@…>, 11 years ago

Attachment: usr_include_dirent.h added

dirent.h

by Peter Loibl <boost@…>, 11 years ago

Attachment: features.h added

features.h

by Peter Loibl <boost@…>, 11 years ago

Attachment: operations.i.gz added

C-Preprocessor output (gzipped)

in reply to:  3 comment:4 by Peter Loibl <boost@…>, 11 years ago

One more hint from my side:

It seems that GNU-C++ does add -D_GNU_SOURCE automatically, CC does not. If I call CC and add -D_GNU_SOURCE to the compile arguments, then the source compiles fine :) Intel C++ seems to add -D_GNU_SOURCE automatically as well.

I attached the detailed call arguments for an empty C++ file for demonstration purposes.

by Peter Loibl <boost@…>, 11 years ago

Attachment: compilers added
Note: See TracTickets for help on using tickets.