Stefan,

I'm not sure where went wrong, I just tried again, start from beginning,
following the exact instruction from the website, still ends up in the same
place.

Here is the  libc/sysdeps/linux/common/posix_fadvise.c where it failed,

#ifdef __NR_arm_fadvise64_64
/* We handle the 64bit alignment issue which is why the arm guys renamed
their


 * syscall in the first place.  So rename it back.



 */
# define __NR_fadvise64_64 __NR_arm_fadvise64_64
#endif

#if defined(__NR_fadvise64) || defined(__NR_fadvise64_64)
# include <fcntl.h>
# include <endian.h>
# include <bits/wordsize.h>

# ifdef __NR_fadvise64_64
int posix_fadvise64(int fd, off64_t offset, off64_t len, int advice);
# endif

int posix_fadvise(int fd, off_t offset, off_t len, int advice)
{
# ifdef __NR_fadvise64_64
        return posix_fadvise64(fd, offset, len, advice);
# else
        int ret;
        INTERNAL_SYSCALL_DECL(err);
#  if __WORDSIZE == 64
        ret = INTERNAL_SYSCALL(fadvise64, err, 4, fd, offset, len, advice);
#  else
#   if defined(__UCLIBC_SYSCALL_ALIGN_64BIT__)
        ret = INTERNAL_SYSCALL(fadvise64, err, 6, fd, /*unused*/0,
#   else
        ret = INTERNAL_SYSCALL(fadvise64, err, 5, fd,
#   endif
                        OFF_HI_LO (offset), len, advice);
#  endif
        if (INTERNAL_SYSCALL_ERROR_P (ret, err))
                return INTERNAL_SYSCALL_ERRNO (ret, err);
        return 0;
#  endif
}
# if defined __UCLIBC_HAS_LFS__ && (!defined __NR_fadvise64_64 ||
__WORDSIZE == 64)
strong_alias(posix_fadvise,posix_fadvise64)
# endif
#endif




2015-01-20 0:10 GMT-05:00 Stefan Kristiansson <
[email protected]>:

> On Tue, Jan 20, 2015 at 3:23 AM, Ziqiang Patrick Huang <
> [email protected]> wrote:
>
>> Stefan,
>>
>> Thanks for your reply, I did use the headers from upstream from
>> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>>
>>
> Ok, good, but something must have went wrong when you installed them then.
> If you look at the place where it failed, __NR_fstat should not be defined
> for us.
>
>
> I solved this problem by commenting some commands out in uclibc makefile.
>>
>>
>> Right now I'm stuck at the below error
>>
>>
> This is caused by the same problem.
>
>
>> libc/sysdeps/linux/common/posix_fadvise.c:52:28: error: conflicting types
>> for 'posix_fadvise64'
>>  strong_alias(posix_fadvise,posix_fadvise64)
>>                             ^
>> ./include/libc-symbols.h:190:26: note: in definition of macro
>> '_strong_alias'
>>    extern __typeof (name) aliasname __attribute__ ((alias (#name)));
>>                           ^
>> libc/sysdeps/linux/common/posix_fadvise.c:52:1: note: in expansion of
>> macro 'strong_alias'
>>  strong_alias(posix_fadvise,posix_fadvise64)
>>  ^
>> In file included from libc/sysdeps/linux/common/posix_fadvise.c:21:0:
>> ./include/fcntl.h:214:12: note: previous declaration of 'posix_fadvise64'
>> was here
>>  extern int posix_fadvise64 (int __fd, __off64_t __offset, __off64_t
>> __len,
>>             ^
>> make: *** [libc/sysdeps/linux/common/posix_fadvise.os] Error 1
>>
>> 2015-01-19 17:39 GMT-05:00 Stefan Kristiansson <
>> [email protected]>:
>>
>> On Mon, Jan 19, 2015 at 7:29 PM, Ziqiang Patrick Huang <
>>> [email protected]> wrote:
>>>
>>>> Hi I'm trying to build uClibc toolchain by following the instructions
>>>> on
>>>> http://opencores.org/or1k/OpenRISC_GNU_tool_chain#Linux_.28uClibc.29_toolchain_.28or1k-linux-uclibc.29
>>>>
>>>> When building uClibc-or1k, I got stuck at the error\
>>>>
>>>> libc/sysdeps/linux/common/fstat.c:48:21: error: storage size of 'kbuf'
>>>> isn't known
>>>> struct kernel_stat kbuf;
>>>>
>>>> Anyone had the same problem before ?
>>>>
>>>>
>>>>
>>> I bet you are using the wrong kernel headers, the instructions says to
>>> use the headers from upstream, did you do that?
>>>
>>
>>
>>
>> --
>> *Ziqiang Huang*
>> *Electrical and Computer Engineering*
>> *Hudson 213c, Duke University*
>> *Tel: 919-491-3677 <919-491-3677>*
>> *Email: [email protected] <[email protected]>*
>>
>
>


-- 
*Ziqiang Huang*
*Electrical and Computer Engineering*
*Hudson 213c, Duke University*
*Tel: 919-491-3677*
*Email: [email protected] <[email protected]>*
_______________________________________________
OpenRISC mailing list
[email protected]
http://lists.openrisc.net/listinfo/openrisc

Reply via email to