mohsinbcm / linux-syscall-support

Automatically exported from code.google.com/p/linux-syscall-support
0 stars 0 forks source link

Compilation failure for MIPS64: __NR_getdents64 is undefined #7

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'm using the Buildroot distribution (http://buildroot.busybox.net/) and I'm 
trying to build a filesystem for MIPS64 n64 LittleEndian with the package 
"google-breakpad" included.

This is snippet of the compilation error (the full build log is attached):

/home/test/autobuild/instance-2/output/host/usr/bin/mips64el-ctng_n64-linux-gnu-
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src -D_LARGEFILE_SOURCE 
-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Werror=missing-braces 
-Werror=non-virtual-dtor -Werror=overloaded-virtual -Werror=reorder 
-Werror=sign-compare -Werror=unused-variable -Werror=vla -fPIC 
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -pipe -Os  
-MT src/client/linux/handler/exception_handler.o -MD -MP -MF $depbase.Tpo -c -o 
src/client/linux/handler/exception_handler.o 
src/client/linux/handler/exception_handler.cc &&\
    mv -f $depbase.Tpo $depbase.Po
In file included from 
src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc:42:0:
./src/third_party/lss/linux_syscall_support.h: In function 'int 
sys_getdents64(int, kernel_dirent64*, int)':
./src/third_party/lss/linux_syscall_support.h:2324:55: error: '__NR_getdents64' 
was not declared in this scope
           register unsigned long __v0 __asm__("$2") = __NR_##name;            \
                                                       ^
./src/third_party/lss/linux_syscall_support.h:2356:9: note: in expansion of 
macro 'LSS_BODY'
         LSS_BODY(type, name, "=r", "r"(__r4), "r"(__r5), "r"(__r6));          \
         ^
./src/third_party/lss/linux_syscall_support.h:2758:14: note: in expansion of 
macro '_syscall3'
   LSS_INLINE _syscall3(int,     getdents64,      int,         f,
              ^
make[1]: *** 
[src/client/linux/minidump_writer/src_client_linux_linux_dumper_unittest_helper-
linux_dumper_unittest_helper.o] Error 1
make[1]: *** Waiting for unfinished jobs....

Original issue reported on code.google.com by per...@gmail.com on 8 Jul 2014 at 3:46

Attachments:

GoogleCodeExporter commented 9 years ago
http://buildroot.busybox.net/ doesn't load...

How can I get a mips64 Linux system to test this? With QEMU/KVM perhaps?

Original comment by thestig@chromium.org on 10 Jul 2014 at 2:46

GoogleCodeExporter commented 9 years ago
Hello, and thanks for your answer.

The buildroot website works fine for me. Anyway, this is the command to clone 
the repository:

git clone git://git.buildroot.net/buildroot

or if you're behind a firewall blocking git:

git clone git://git.buildroot.net/buildroot

Buildroot will crosscompile, so you don't need a MIPS64 Linux system to 
reproduce the failure. Buildroot is a tool to generate embedded Linux systems 
by crosscompiling, and let you choose the target architecture. So, the steps to 
reproduce the failures are:

-clone the Buildroot repository
-type "make menuconfig" and go to the "Target options" menu.
-choose "MIPS64 Little Endian" target architecture.
-choose "n64" target ABI
-go to the "Toolchain" menu and select "External toolchain" type.
(that will download a toolchain, so you will save time by not building a 
toolchain to generate code for your selected target)
-go to "Target packages" -> "Debugging, profiling and benchmark" and select the 
"google-breakpad" package.
-exit and save your configuration
-type "make"

And just to answer your question. Yes, QEMU/KVM works if you want to emulate a 
MIPS64 Linux system.

Original comment by per...@gmail.com on 10 Jul 2014 at 9:12

GoogleCodeExporter commented 9 years ago
Can you try the attached patch?

Original comment by thestig@chromium.org on 11 Jul 2014 at 7:12

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hello,

the patch you attached doesn't work directly on Buildroot, so I needed
to rewrite it. I have attached the new patch just in case you want to
review it. I think I haven't done any mistake.

It fails with the same problem. I have attached the full build log.

Original comment by per...@gmail.com on 11 Jul 2014 at 8:09

Attachments:

GoogleCodeExporter commented 9 years ago
Actually, this problem went away. You have different problems in the comment 5 
build.log, which are outside of the scope of this bug. (Back to Breakpad...)

Original comment by thestig@chromium.org on 11 Jul 2014 at 6:51

GoogleCodeExporter commented 9 years ago

Original comment by vapier@chromium.org on 16 Jan 2015 at 1:58

GoogleCodeExporter commented 9 years ago
Is this still a valid issue or should we close it?

Original comment by pet...@mips.com on 24 Feb 2015 at 12:37