Modify

Opened 3 years ago

Closed 3 years ago

#19075 closed defect (fixed)

Error Compiling r44550 trunk for bcrm2709 raspberry pi 2 in osx yosemite

Reported by: zandegran Owned by: developers
Priority: normal Milestone:
Component: base system Version: Trunk
Keywords: Cc:

Description

I get this error..What could be the cause??

.
..
...
getconf: no such configuration parameter `LFS_CFLAGS'
checking whether strerror_r returns char *... yes
checking for mprotect... In file included from src/fatlabel.c:35:
src/common.h:23:10: fatal error: 'asm/types.h' file not found
#include <asm/types.h>
         ^
1 error generated.
make[4]: *** [fatlabel.o] Error 1
make[3]: *** [/Volumes/OpenWrt/trunk/build_dir/host/dosfstools-3.0.26/.built] Error 2
make[3]: Leaving directory `/Volumes/OpenWrt/trunk/tools/dosfstools'
make[2]: *** [tools/dosfstools/compile] Error 2
make[2]: *** Waiting for unfinished jobs....
no
.
.
.

Attachments (0)

Change History (12)

comment:2 Changed 3 years ago by zandegran

So I understand that I am doing something wrong. I will Look into the link. before that I've also tried compiling with the command make ARCH=arm CROSS_COMPILE=${CCPREFIX} V=s and CCPREFIX has the path of the ARM compiler in my case "/opt/local/arm-none-ebi/bin" as I installed via ports.
Still I get errors.

comment:3 Changed 3 years ago by anonymous

The error state that you are missing a header library (types.h), which is normal because it is not included on OSX... I sent you a link wich contains another link to a types.h definition library and you are talking about compiler options?

comment:4 Changed 3 years ago by anonymous

It did not work. Also tried http://sourceforge.net/p/e2fsprogs/bugs/311/ and now it's saying

In file included from src/fatlabel.c:36:
src/fsck.fat.h:37:10: fatal error: 'asm/byteorder.h' file not found
#include <asm/byteorder.h>
         ^
1 error generated.

so what is this asm?

comment:5 Changed 3 years ago by Zandegran

It did not work. Also tried http://sourceforge.net/p/e2fsprogs/bugs/311/ and now it's saying

In file included from src/fatlabel.c:36:
src/fsck.fat.h:37:10: fatal error: 'asm/byteorder.h' file not found
#include <asm/byteorder.h>
         ^
1 error generated.

so what is this asm?

comment:6 Changed 3 years ago by anonymous

Well you are going in the right direction... Asm is a assembly language library, maybe you could try to put a Linux ask library in you compile path... Here is a link to a Ubuntu package including those files...

http://security.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_2.6.32-73.140_i386.deb

comment:7 Changed 3 years ago by zandegran

Thank you so much, I got past the asm error. I just copied the files in include folder to /usr/include.
Now I get this error

In file included from src/fatlabel.c:36:
src/fsck.fat.h:43:10: fatal error: 'endian.h' file not found
#include <endian.h>

But I see the file in /usr/include/machine/

comment:8 Changed 3 years ago by zandegran

https://code.google.com/p/s3ql/issues/detail?id=441 Tt is stated here that osx does not have endian.h, anyhow I tried to get that patched endian.h which is not for OpenWRT and put it in /usr/include and obviously it did not work.

I get the following errors

In file included from src/fatlabel.c:36:
src/fsck.fat.h:146:5: error: unknown type name 'loff_t'; did you mean 'off_t'?
    loff_t offset;
    ^~~~~~
    off_t
/usr/include/sys/_types/_off_t.h:30:25: note: 'off_t' declared here
typedef __darwin_off_t          off_t;
                                ^
In file included from src/fatlabel.c:36:
src/fsck.fat.h:147:5: error: unknown type name 'loff_t'; did you mean 'off_t'?
    loff_t lfn_offset;
    ^~~~~~
    off_t
/usr/include/sys/_types/_off_t.h:30:25: note: 'off_t' declared here
typedef __darwin_off_t          off_t;
                                ^
In file included from src/fatlabel.c:36:
src/fsck.fat.h:160:5: error: unknown type name 'loff_t'; did you mean 'off_t'?
    loff_t fat_start;
    ^~~~~~
    off_t
/usr/include/sys/_types/_off_t.h:30:25: note: 'off_t' declared here
typedef __darwin_off_t          off_t;
                                ^
In file included from src/fatlabel.c:36:
src/fsck.fat.h:165:5: error: unknown type name 'loff_t'; did you mean 'off_t'?
    loff_t root_start;
    ^~~~~~
    off_t
/usr/include/sys/_types/_off_t.h:30:25: note: 'off_t' declared here
typedef __darwin_off_t          off_t;
                                ^
In file included from src/fatlabel.c:36:
src/fsck.fat.h:167:5: error: unknown type name 'loff_t'; did you mean 'off_t'?
    loff_t data_start;
    ^~~~~~
    off_t
/usr/include/sys/_types/_off_t.h:30:25: note: 'off_t' declared here
typedef __darwin_off_t          off_t;
                                ^
In file included from src/fatlabel.c:36:
src/fsck.fat.h:170:5: error: unknown type name 'loff_t'; did you mean 'off_t'?
    loff_t fsinfo_start;        /* 0 if not present */
    ^~~~~~
    off_t
/usr/include/sys/_types/_off_t.h:30:25: note: 'off_t' declared here
typedef __darwin_off_t          off_t;
                                ^
In file included from src/fatlabel.c:36:
src/fsck.fat.h:172:5: error: unknown type name 'loff_t'; did you mean 'off_t'?
    loff_t backupboot_start;    /* 0 if not present */
    ^~~~~~
    off_t
/usr/include/sys/_types/_off_t.h:30:25: note: 'off_t' declared here
typedef __darwin_off_t          off_t;
                                ^
In file included from src/fatlabel.c:37:
src/io.h:32:1: error: unknown type name 'loff_t'; did you mean 'off_t'?
loff_t llseek(int fd, loff_t offset, int whence);
^~~~~~
off_t
/usr/include/sys/_types/_off_t.h:30:25: note: 'off_t' declared here
typedef __darwin_off_t          off_t;
                                ^
In file included from src/fatlabel.c:37:
src/io.h:32:23: error: unknown type name 'loff_t'; did you mean 'off_t'?
loff_t llseek(int fd, loff_t offset, int whence);
                      ^~~~~~
                      off_t
/usr/include/sys/_types/_off_t.h:30:25: note: 'off_t' declared here
typedef __darwin_off_t          off_t;
                                ^
In file included from src/fatlabel.c:37:
src/io.h:41:14: error: unknown type name 'loff_t'; did you mean 'off_t'?
void fs_read(loff_t pos, int size, void *data);
             ^~~~~~
             off_t
/usr/include/sys/_types/_off_t.h:30:25: note: 'off_t' declared here
typedef __darwin_off_t          off_t;
                                ^
In file included from src/fatlabel.c:37:
src/io.h:46:13: error: unknown type name 'loff_t'; did you mean 'off_t'?
int fs_test(loff_t pos, int size);
            ^~~~~~
            off_t
/usr/include/sys/_types/_off_t.h:30:25: note: 'off_t' declared here
typedef __darwin_off_t          off_t;
                                ^
make[3]: Leaving directory `/Volumes/OpenWrt/trunk/tools/sstrip'
In file included from src/fatlabel.c:37:
src/io.h:51:15: error: unknown type name 'loff_t'; did you mean 'off_t'?
void fs_write(loff_t pos, int size, void *data);
              ^~~~~~
              off_t
/usr/include/sys/_types/_off_t.h:30:25: note: 'off_t' declared here
typedef __darwin_off_t          off_t;
                                ^
In file included from src/fatlabel.c:38:
src/boot.h:28:1: error: unknown type name 'loff_t'; did you mean 'off_t'?
loff_t find_volume_de(DOS_FS * fs, DIR_ENT * de);
^~~~~~
off_t
/usr/include/sys/_types/_off_t.h:30:25: note: 'off_t' declared here
typedef __darwin_off_t          off_t;
                                ^
In file included from src/fatlabel.c:39:
src/fat.h:52:1: error: unknown type name 'loff_t'; did you mean 'off_t'?
loff_t cluster_start(DOS_FS * fs, uint32_t cluster);
^~~~~~
off_t
/usr/include/sys/_types/_off_t.h:30:25: note: 'off_t' declared here
typedef __darwin_off_t          off_t;
                                ^
In file included from src/fatlabel.c:41:
src/check.h:26:1: error: unknown type name 'loff_t'; did you mean 'off_t'?
loff_t alloc_rootdir_entry(DOS_FS * fs, DIR_ENT * de, const char *pattern);
^~~~~~
off_t
/usr/include/sys/_types/_off_t.h:30:25: note: 'off_t' declared here
typedef __darwin_off_t          off_t;
                                ^
src/fatlabel.c:95:5: error: unknown type name 'loff_t'; did you mean 'off_t'?
    loff_t offset;
    ^~~~~~
    off_t
/usr/include/sys/_types/_off_t.h:30:25: note: 'off_t' declared here
typedef __darwin_off_t          off_t;

comment:9 Changed 3 years ago by anonymous

I think you need Linux one, not Darwin (Os X). Variables declaration is different and it's probably what is causing the error because the OpenWRT kernel is a Linux not not Darwin. If I was you I would find the Ubuntu i386 package with this library. And do the same thing if you have more library errors after...

comment:10 Changed 3 years ago by zandegran

I got the GCC with the required asm libraries from http://crossgcc.rts-software.org/doku.php?id=compiling_for_linux but I don't know how to point the compiler to it, with out any additional tools. If there is no direct way, I am going to try building it in Ubuntu tomorrow..

comment:11 Changed 3 years ago by zandegran

I successfully built it in Ubuntu, Finally.

comment:12 Changed 3 years ago by nbd

  • Resolution set to fixed
  • Status changed from new to closed

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.