Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7615411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T02:38:19+00:00 2026-05-31T02:38:19+00:00

I am trying to compile android kernel (cyanogen) for Samsung Galaxy mini , according

  • 0

I am trying to compile android kernel (cyanogen) for Samsung Galaxy mini , according to these instructions:

I am using CM-7.

I performed these steps:

  1. Download kernel source code.

  2. Configure the build :

    adb pull /proc/config.gz /home/user_name/android/kernel/cm-kernel/config.gz 
    cat config.gz | gunzip > .config 
    make ARCH=arm CROSS_COMPILE=$CCOMPILER menuconfig
    
  3. Make the build:

     make ARCH=arm CROSS_COMPILE=$CCOMPILER -j4
    

After this kernel starts compiling and everything works fine but then it reports an error which appear to be an error in the source code, here is the output in the terminal.

 kernel/cpuset.c:1385: error: ‘task’ undeclared (first use in this
 function)
 kernel/cpuset.c:1385: error: (Each undeclared identifier is reported
 only once
 kernel/cpuset.c:1385: error: for each function it appears in.)
 kernel/cpuset.c: In function ‘cpuset_print_task_mems_allowed’: 
  CC [M]  fs/ceph/snap.o
  CC [M]  crypto/seed.o
  CC [M]  fs/btrfs/disk-io.o
  CC [M]  fs/cifs/connect.o
  CC [M]  fs/ceph/xattr.o
  CC [M]  crypto/salsa20_generic.o
  CC [M]  crypto/deflate.o
  CC [M]  fs/ceph/mds_client.o
  CC [M]  crypto/zlib.o
  CC [M]  fs/btrfs/transaction.o
  CC [M]  crypto/michael_mic.o
  CC [M]  crypto/authenc.o
  CC [M]  fs/ceph/mdsmap.o
  CC [M]  fs/cifs/dir.o
  CC [M]  fs/ceph/strings.o
  CC [M]  fs/btrfs/inode.o
  CC [M]  fs/ceph/ceph_frag.o
  CC [M]  crypto/lzo.o
  CC [M]  fs/ceph/debugfs.o
  CC [M]  crypto/ansi_cprng.o
  CC [M]  fs/cifs/file.o
  LD [M]  fs/ceph/ceph.o
  LD      fs/coda/built-in.o
  CC [M]  fs/coda/psdev.o
  CC [M]  crypto/tcrypt.o
fs/cifs/file.c: In function 'cifs_write':
fs/cifs/file.c:1036: warning: format '%zd' expects type 'signed size_t', but argument     3     has type 'size_t'
In file included from fs/coda/psdev.c:45:
include/linux/coda.h:223: error: expected specifier-qualifier-list before 'u_quad_t'
make[2]: *** [fs/coda/psdev.o] Error 1
make[1]: *** [fs/coda] Error 2
make[1]: *** Waiting for unfinished jobs....
CC [M]  crypto/ghash-generic.o
CC [M]  crypto/xor.o
include/asm-generic/xor.h:696: warning: 'xor_block_8regs_p' defined but not used
include/asm-generic/xor.h:704: warning: 'xor_block_32regs_p' defined but not used
CC [M]  fs/cifs/inode.o
LD      crypto/async_tx/built-in.o
CC [M]  crypto/async_tx/async_tx.o
CC [M]  crypto/async_tx/async_memcpy.o
CC [M]  fs/btrfs/file.o
CC [M]  fs/btrfs/tree-defrag.o
crypto/async_tx/async_memcpy.c: In function 'async_memcpy':
crypto/async_tx/async_memcpy.c:72: warning: format '%zu' expects type 'size_t', but         argument 3 has type 'unsigned int'
crypto/async_tx/async_memcpy.c:76: warning: format '%zu' expects type 'size_t', but     argument 3 has type 'unsigned int'
CC [M]  crypto/async_tx/async_xor.o
CC [M]  fs/btrfs/extent_map.o
crypto/async_tx/async_xor.c: In function 'async_xor':
crypto/async_tx/async_xor.c:202: warning: format '%zu' expects type 'size_t', but         argument 3 has type 'unsigned int'
crypto/async_tx/async_xor.c:208: warning: format '%zu' expects type 'size_t', but     argument 3 has type 'unsigned int'
crypto/async_tx/async_xor.c: In function 'async_xor_val':
crypto/async_tx/async_xor.c:286: warning: format '%zu' expects type 'size_t', but argument 3 has type 'unsigned int'
crypto/async_tx/async_xor.c:314: warning: format '%zu' expects type 'size_t', but argument 3 has type 'unsigned int'
CC [M]  crypto/async_tx/async_pq.o
CC [M]  fs/btrfs/sysfs.o
crypto/async_tx/async_pq.c: In function 'async_gen_syndrome':
crypto/async_tx/async_pq.c:218: warning: format '%zu' expects type 'size_t', but  argument 4 has type 'unsigned int'
crypto/async_tx/async_pq.c:225: warning: format '%zu' expects type 'size_t', but  argument 4 has type 'unsigned int'
crypto/async_tx/async_pq.c: In function 'async_syndrome_val':
crypto/async_tx/async_pq.c:295: warning: format '%zu' expects type 'size_t', but  argument 4 has type 'unsigned int'
crypto/async_tx/async_pq.c:344: warning: format '%zu' expects type 'size_t', but argument 4 has type 'unsigned int'
CC [M]  fs/btrfs/struct-funcs.o
CC [M]  fs/cifs/link.o
CC [M]  fs/btrfs/xattr.o
CC [M]  crypto/async_tx/async_raid6_recov.o
crypto/async_tx/async_raid6_recov.c: In function 'async_raid6_2data_recov':
crypto/async_tx/async_raid6_recov.c:334: warning: format '%zu' expects type 'size_t', but argument 4 has type 'unsigned int'
crypto/async_tx/async_raid6_recov.c: In function 'async_raid6_datap_recov':
crypto/async_tx/async_raid6_recov.c:410: warning: format '%zu' expects type 'size_t', but argument 4 has type 'unsigned int'
CC [M]  fs/cifs/misc.o
CC [M]  fs/btrfs/ordered-data.o
CC [M]  crypto/async_tx/raid6test.o
LD      crypto/crypto.o
LD      crypto/built-in.o
CC [M]  fs/btrfs/extent_io.o
CC [M]  fs/btrfs/volumes.o
CC [M]  fs/cifs/netmisc.o
CC [M]  fs/cifs/smbdes.o
CC [M]  fs/cifs/smbencrypt.o
CC  [M]  fs/cifs/transport.o
CC [M]  fs/cifs/asn1.o
CC [M]  fs/btrfs/async-thread.o
CC [M]  fs/cifs/md4.o
CC [M]  fs/cifs/md5.o
CC [M]  fs/cifs/cifs_unicode.o
CC [M]  fs/btrfs/ioctl.o
CC [M]  fs/btrfs/locking.o
CC [M]  fs/cifs/nterr.o
CC [M]  fs/cifs/xattr.o
CC [M]  fs/cifs/cifsencrypt.o
CC [M]  fs/btrfs/orphan.o
CC [M]  fs/cifs/readdir.o
CC [M]  fs/btrfs/export.o
CC [M]  fs/cifs/ioctl.o
CC [M]  fs/btrfs/tree-log.o
CC [M]  fs/btrfs/acl.o
CC [M]  fs/btrfs/free-space-cache.o
CC [M]  fs/cifs/sess.o
CC [M]  fs/btrfs/zlib.o
CC [M]  fs/btrfs/compression.o
CC [M]  fs/cifs/export.o
CC [M]  fs/btrfs/delayed-ref.o
CC [M]  fs/btrfs/relocation.o
CC [M]  fs/cifs/cifs_spnego.o
CC [M]  fs/cifs/dns_resolve.o
CC [M]  fs/cifs/cifs_dfs_ref.o
LD [M]  fs/cifs/cifs.o
LD [M]  fs/btrfs/btrfs.o
make: *** [fs] Error 2

If anyone can please tell how to resolve this issue.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T02:38:20+00:00Added an answer on May 31, 2026 at 2:38 am

    There was error in the source code, in the file , kernel/cpuset.c
    on line 1385, ‘task’ was used, where as it should be ‘tsk’ , moreover
    it was used later without being assigned the value. It should have been assigned the value in this way : __task_cred(tsk).

    This is the original code:

    /* Called by cgroups to determine if a cpuset is usable; cgroup_mutex held */
    static int cpuset_can_attach(struct cgroup_subsys *ss, struct cgroup *cont,
                 struct task_struct *tsk, bool threadgroup)
    {
    int ret;
    struct cpuset *cs = cgroup_cs(cont);
    
    if ((current != task) && (!capable(CAP_SYS_ADMIN))) {
        const struct cred *cred = current_cred(), *tcred;
    
        if (cred->euid != tcred->uid && cred->euid != tcred->suid)
            return -EPERM;
    }
    

    ………………….

    This is the modified code:

    /* Called by cgroups to determine if a cpuset is usable; cgroup_mutex held */
    static int cpuset_can_attach(struct cgroup_subsys *ss, struct cgroup *cont,
                 struct task_struct *tsk, bool threadgroup)
    {
    int ret;
    struct cpuset *cs = cgroup_cs(cont);
    
    if ((current != tsk) && (!capable(CAP_SYS_ADMIN))) {
        const struct cred *cred = current_cred(), *tcred;
        tcred = __task_cred(tsk); 
    
        if (cred->euid != tcred->uid && cred->euid != tcred->suid)
            return -EPERM;
    }
    

    This link explains different possible errors which can occur while android kernel compilation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to compile android kernel (cyanogen) for Samsung Galaxy mini , according
While trying to compile a 64 bit linux kernel using gcc, I see the
I am trying to compile a newer Android kernel on my phone. The problem
I'm trying to compile fastboot for Android using this guide , but I'm getting
I'm trying to compile a project using appcelerator (crossplatform dev for iphone/android). Just evaluating
I am trying to compile a library using android-ndk-r5 standalone toolchain and autotools. When
I'm running Ubuntu Linux, and trying to compile native code for Android using the
I'm trying to compile an ntp client for android using the android build system
I'm trying to compile Dosbox0.74 for Android with pelya's SDL port (https://github.com/pelya/commandergenius) using the
I'm trying to compile some given assembler files (.S) for Android using the NDK.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.