what is the definition of _nxt_sys_socket in $INSTALLROOT/src/lib/libast/ast_socket.h
On Tue, Oct 29, 2013 at 4:12 PM, Giovanni Rapagnani <[email protected]>wrote: > On 28/10/13 02:45, Irek Szczesniak wrote: > >> Well, this is a bug in debian. ast-ksh uses plain /usr/bin/cc and > >> Roland Mainz's buildksh93.sh uses either gcc -std=gnu99 > >> -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1 or clang -std=gnu99 > >> -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1, which per POSIX should give a > >> working compilation environment. Debian, and not ast-ksh, breaks this. > >> > >> Giovanni, if you would kindly file a bug against Debian's system > >> includes which clearly states that specifying gcc -std=gnu99 > >> -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1 or clang -std=gnu99 > >> -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1 does not result in a working > >> compilation environment where the X/OPEN and GNU extensions are > >> available. > >> > >> This ball is now clearly in Debian's court. And it stinks like rotten > flesh. > > I do not agree with this conclusion for several reasons (stated below) > > Let me just remind that at the very beginning of the issue, Glenn told > me that it was probably an issue with the impossibility to find the > socket.h file. This is why I created the symlink (/usr/include/sys -> > /usr/include/x86_64-linux-gnu/sys) which allowed me to successfully > build ksh. I can now tell that the socket.h is the only file causing the > problem because when I create the directory /usr/include/sys and I only > put the file socket.h in it, the build is successful. (file copied from > /usr/include/x86_64-linux-gnu/sys). > > > Reason 1: > If I run 'echo | gcc -v -x c -E -', I can see in the output: > > #include <...> search starts here: > /usr/lib/gcc/x86_64-linux-gnu/4.7/include > /usr/local/include > /usr/lib/gcc/x86_64-linux-gnu/4.7/include-fixed > /usr/include/x86_64-linux-gnu > /usr/include > > which means that gcc has the ability to find the sys/socket.h in the > right place (i.e: /usr/include/x86_64-linux-gnu). Note that if I run the > same command on a ARM installation, I get: > > #include <...> search starts here: > /usr/lib/gcc/arm-linux-gnueabihf/4.6/include > /usr/local/include > /usr/lib/gcc/arm-linux-gnueabihf/4.6/include-fixed > /usr/include/arm-linux-gnueabihf > /usr/include > > which is also fine. > > > Reason 2: > If I compare a failed build log and a successful one, the first > meaningfull difference I encounter is: > > build_ok.log: > iffe: test: is sys/socket an include path for the native header ... yes > > build_fail.log: > iffe: test: is sys/socket an include path for the native header ... no > > If I understand well, iffe is run before gcc. > > > Reason 3: > Moreover, when I do a comparison between all the files of a successful > build and the files of a failed one, I notice a difference in the file > arch/linux.i386-64/include/ast/ast_socket.h. The 2 lines below are found > in the ast_socket.h from the successful build and missing in the failed > one: > > #define _nxt_sys_socket <../include/sys/socket.h> /* include path for > the native <sys/socket.h> */ > #define _nxt_sys_socket_str "../include/sys/socket.h" /* include > string for the native <sys/socket.h> */ > > Here also, this header file is created before gcc is invoked. Isn't it? > > > So I have the feeling that the culprit is one of the tools that is > invoked before gcc, probably the tool that creates the > arch/linux.i386-64/include/ast/ast_socket.h file. This tool probably has > no knowledge of the multiarch implementation in Debian. > > > In attachment you will find the following files: > * build_ok.log.gz: the build log recorded during a successful build > (with the symlink to /usr/include/x86_64-linux-gnu/sys) > * build_fail.log.gz: the build log recorded during a failed build > (without the symlink) > * build_file_diff.log.gz: the difference between each file of a > successful build and a failed one. > > > > ... or I should slap myself. On a coworkers machine the installation > > of the 'libc6-dev-i386' package fixed the problem. > > libc6-dev-i386 is a package meant only to x86_64 system and which > install 32 bits development files (lib and header). This package > installs, among other, the file /usr/include/sys/socket.h. Of course > installing this package on my system is not what I want to do because I > am trying to build a 64 bit version of ksh on my 64 bit system. Thus > there is no point in installing 32 bit version of the header file. > > > > Now the question for Oliver and Olga is to figure out what cross > > platform superclass package 'libc6-dev-i386' translates to so make > > that a build dependency on all platforms. > > > If someone could have a look at the log files and clearly tells if the > issue is in debian or in ksh build chain, that would be great. > > Kind regards. > > -- > Giovanni Rapagnani > > _______________________________________________ > ast-developers mailing list > [email protected] > http://lists.research.att.com/mailman/listinfo/ast-developers > >
_______________________________________________ ast-developers mailing list [email protected] http://lists.research.att.com/mailman/listinfo/ast-developers
