Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compilation problem with socket API #3

Open
FaZoREX opened this issue Aug 11, 2017 · 6 comments
Open

compilation problem with socket API #3

FaZoREX opened this issue Aug 11, 2017 · 6 comments

Comments

@FaZoREX
Copy link

FaZoREX commented Aug 11, 2017

Hello,

I encountered the following error when I tried to install mptcp_v0.91.3 with your applied socket API patches ( https://github.com/hoang-tranviet/mptcp.git ):

net/ipv4/tcp.c: In function ‘mptcp_setsockopt_sub_setsockopt’:
net/ipv4/tcp.c:2423:19: warning: unused variable ‘mpcb’ [-Wunused-variable]
  struct mptcp_cb *mpcb = tp->mpcb;
                   ^
net/ipv4/tcp.c: In function ‘mptcp_getsockopt_sub_ids’:
net/ipv4/tcp.c:2976:4: error: break statement not within loop or switch
    break;
    ^
net/ipv4/tcp.c: In function ‘mptcp_getsockopt_close_sub_id’:
net/ipv4/tcp.c:3025:4: error: implicit declaration of function ‘mptcp_sub_force_close’ [-Werror=implicit-function-declaration]
    mptcp_sub_force_close(sub_sk);
    ^
net/ipv4/tcp.c:3002:24: warning: unused variable ‘tmp’ [-Wunused-variable]
  struct sock *sub_sk, *tmp;
                        ^
net/ipv4/tcp.c:3001:19: warning: unused variable ‘mpcb’ [-Wunused-variable]
  struct mptcp_cb *mpcb = tp->mpcb;
                   ^
net/ipv4/tcp.c: In function ‘mptcp_getsockopt_get_sub_tuple’:
net/ipv4/tcp.c:3038:19: warning: unused variable ‘mpcb’ [-Wunused-variable]
  struct mptcp_cb *mpcb = tp->mpcb;
                   ^
net/ipv4/tcp.c: In function ‘mptcp_getsockopt_open_sub_tuple’:
net/ipv4/tcp.c:3173:10: error: implicit declaration of function ‘mptcp_init4_subsockets’ [-Werror=implicit-function-declaration]
   return mptcp_init4_subsockets(tp->meta_sk, &loc, &rem);
          ^
net/ipv4/tcp.c:3207:10: error: implicit declaration of function ‘mptcp_init6_subsockets’ [-Werror=implicit-function-declaration]
   return mptcp_init6_subsockets(tp->meta_sk, &loc, &rem);
          ^
net/ipv4/tcp.c: In function ‘mptcp_getsockopt_sub_getsockopt’:
net/ipv4/tcp.c:3218:19: warning: unused variable ‘mpcb’ [-Wunused-variable]
  struct mptcp_cb *mpcb = tp->mpcb;
                   ^
net/ipv4/tcp.c: At top level:
net/ipv4/tcp.c:2420:12: warning: ‘mptcp_setsockopt_sub_setsockopt’ defined but not used [-Wunused-function]
 static int mptcp_setsockopt_sub_setsockopt(struct sock *sk, char __user *optval
            ^
net/ipv4/tcp.c:2942:12: warning: ‘mptcp_getsockopt_sub_ids’ defined but not used [-Wunused-function]
 static int mptcp_getsockopt_sub_ids(struct sock *sk, char __user *optval,
            ^
net/ipv4/tcp.c:2997:12: warning: ‘mptcp_getsockopt_close_sub_id’ defined but not used [-Wunused-function]
 static int mptcp_getsockopt_close_sub_id(struct sock *sk, char __user *optval,
            ^
net/ipv4/tcp.c:3034:12: warning: ‘mptcp_getsockopt_get_sub_tuple’ defined but not used [-Wunused-function]
 static int mptcp_getsockopt_get_sub_tuple(struct sock *sk, char __user *optval,
            ^
net/ipv4/tcp.c:3134:12: warning: ‘mptcp_getsockopt_open_sub_tuple’ defined but not used [-Wunused-function]
 static int mptcp_getsockopt_open_sub_tuple(struct sock *sk, char __user *optval
            ^
net/ipv4/tcp.c:3214:12: warning: ‘mptcp_getsockopt_sub_getsockopt’ defined but not used [-Wunused-function]
 static int mptcp_getsockopt_sub_getsockopt(struct sock *sk, char __user *optval
            ^
cc1: some warnings being treated as errors
scripts/Makefile.build:258: recipe for target 'net/ipv4/tcp.o' failed
make[2]: *** [net/ipv4/tcp.o] Error 1
scripts/Makefile.build:403: recipe for target 'net/ipv4' failed
make[1]: *** [net/ipv4] Error 2
Makefile:961: recipe for target 'net' failed
make: *** [net] Error 2

I would appreciate any advice.

thank you
Feri

@hoang-tranviet
Copy link
Owner

Hello,
Did you try to clone and compile the kernel on mptcp_v0.91.3_api branch, and not the vagrant box?
I need to take some times to retest this branch.

In the mean time, could you try the mptcp_v0.92_socket_api branch?
https://github.com/hoang-tranviet/mptcp/tree/mptcp_v0.92_socket_api

Thanks

@hoang-tranviet
Copy link
Owner

If you compiled against different kernel versions, you might need to clean the build by:
make clean
or even by:
make mrproper

@FaZoREX
Copy link
Author

FaZoREX commented Aug 15, 2017

Hello,

I tried to install the mptcp_v0.91.3_api and mptcp_v0.92_socket_api. I did make clean after make oldconfig and then compile it with make and installed it with sudo make install it gave me this output:

sh /home/mptcp/arch/x86/boot/install.sh 4.4.70+ arch/x86/boot/bzImage \
	System.map "/boot"
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.70+ /boot/vmlinuz-4.4.70+
run-parts: executing /etc/kernel/postinst.d/dkms 4.4.70+ /boot/vmlinuz-4.4.70+
Error! Your kernel headers for kernel 4.4.70+ cannot be found.
Please install the linux-headers-4.4.70+ package,
or use the --kernelsourcedir option to tell DKMS where it's located
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.70+ /boot/vmlinuz-4.4.70+
update-initramfs: Generating /boot/initrd.img-4.4.70+
WARNING: missing /lib/modules/4.4.70+
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/4.4.70+: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_ZGFQ6K/lib/modules/4.4.70+/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_ZGFQ6K/lib/modules/4.4.70+/modules.builtin: No such file or directory
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.4.70+ /boot/vmlinuz-4.4.70+
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.70+ /boot/vmlinuz-4.4.70+
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.70+ /boot/vmlinuz-4.4.70+
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.70+ /boot/vmlinuz-4.4.70+
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.4.70+
Found initrd image: /boot/initrd.img-4.4.70+
Found linux image: /boot/vmlinuz-4.4.70+.old
Found initrd image: /boot/initrd.img-4.4.70+
Found linux image: /boot/vmlinuz-4.2.0-42-generic
Found initrd image: /boot/initrd.img-4.2.0-42-generic
Found linux image: /boot/vmlinuz-4.2.0-16-generic
Found initrd image: /boot/initrd.img-4.2.0-16-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done

after restarting in the kernel 4.4.70+ it boots into (initramfs). I think the kernel has been installed but there is some issue with the booting.

Feri

@hoang-tranviet
Copy link
Owner

Hi Feri,
OK I don't know exactly your scenario, I think we should narrow down the problem.
Have you tried to compile and install the vanilla MPTCP kernel?
Are you working on the provided VM or other host system?

Hoang

@hoang-tranviet
Copy link
Owner

hoang-tranviet commented Aug 16, 2017

Hi,

Just saw your error: "Error! Your kernel headers for kernel 4.4.70+ cannot be found."

Have you run
sudo make modules_install install
and then
sudo make headers_install INSTALL_HDR_PATH=/usr

@FaZoREX
Copy link
Author

FaZoREX commented Aug 16, 2017

Hi Hoang,

thank you very much, the above two commands worked and now I could boot to the new mptcp_v0.92_socket_api kernel.

How can I check whether the socket API is there without writing an actual socket program?

By the way I installed this mptcp_v0.92_socket_api kernel on a fresh ubuntu Virtualbox VM. I had installed previously your Vagrantbox version as well which works perfectly. Great job and thank you again.

Cheers
Feri

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants