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

noddos: fails to build #8349

Closed
nwf opened this issue Mar 6, 2019 · 16 comments · Fixed by #8758
Closed

noddos: fails to build #8349

nwf opened this issue Mar 6, 2019 · 16 comments · Fixed by #8758

Comments

@nwf
Copy link
Contributor

nwf commented Mar 6, 2019

Maintainer: @StevenHessing
Environment: OpenWrt HEAD

Description:

noddos fails to build with modern ipset library, after at least http://git.netfilter.org/ipset/commit/?id=55fdd96e331e920ee62bd816a572ac24f6dcd1ae. The compiler spew is as follows:

make[5]: Entering directory '/tank/openwrt/scratch/builder-usbnetgw2/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/noddos-0.5.5'
[  1%] Building CXX object src/CMakeFiles/Identifier_test.dir/DeviceProfile.cxx.o
In file included from /tank/openwrt/scratch/builder-usbnetgw2/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/noddos-0.5.5/src/DeviceProfile.h:44:0,
                 from /tank/openwrt/scratch/builder-usbnetgw2/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/noddos-0.5.5/src/DeviceProfile.cxx:23:
/tank/openwrt/scratch/builder-usbnetgw2/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/noddos-0.5.5/src/Ipset.h: In member function 'bool Ipset::Exists()':
/tank/openwrt/scratch/builder-usbnetgw2/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/noddos-0.5.5/src/Ipset.h:102:70: error: invalid conversion from'int (*)(const char*, ...)' to 'ipset_print_outfn {aka int (*)(ipset_session*, void*, const char*, ...)}' [-fpermissive]
             struct ipset_session *session = ipset_session_init(printf);
                                                                      ^
/tank/openwrt/scratch/builder-usbnetgw2/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/noddos-0.5.5/src/Ipset.h:102:70: error: too few arguments to function 'ipset_session* ipset_session_init(ipset_print_outfn, void*)'
In file included from /tank/openwrt/scratch/builder-usbnetgw2/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/noddos-0.5.5/src/Ipset.h:37:0,
                 from /tank/openwrt/scratch/builder-usbnetgw2/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/noddos-0.5.5/src/DeviceProfile.h:44,
                 from /tank/openwrt/scratch/builder-usbnetgw2/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/noddos-0.5.5/src/DeviceProfile.cxx:23:
/tank/openwrt/scratch/builder-usbnetgw2/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/usr/include/libipset/session.h:132:30: note: declared here
 extern struct ipset_session *ipset_session_init(ipset_print_outfn outfn,
                              ^~~~~~~~~~~~~~~~~~
In file included from /tank/openwrt/scratch/builder-usbnetgw2/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/noddos-0.5.5/src/DeviceProfile.h:44:0,
                 from /tank/openwrt/scratch/builder-usbnetgw2/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/noddos-0.5.5/src/DeviceProfile.cxx:23:
/tank/openwrt/scratch/builder-usbnetgw2/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/noddos-0.5.5/src/Ipset.h:109:17: error: 'ipset_envopt_parse' was not declared in this scope
             if (ipset_envopt_parse(session, IPSET_ENV_EXIST, NULL) < 0) {
                 ^~~~~~~~~~~~~~~~~~
/tank/openwrt/scratch/builder-usbnetgw2/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/noddos-0.5.5/src/Ipset.h:109:17: note: suggested alternative: 'ipset_envopt_unset'
             if (ipset_envopt_parse(session, IPSET_ENV_EXIST, NULL) < 0) {
                 ^~~~~~~~~~~~~~~~~~
                 ipset_envopt_unset
/tank/openwrt/scratch/builder-usbnetgw2/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/noddos-0.5.5/src/Ipset.h:116:95: error: 'ipset_session_error' was not declared in this scope
                 syslog (LOG_ERR, "Ipset: Can't commit for setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
                                                                                               ^~~~~~~~~~~~~~~~~~~
/tank/openwrt/scratch/builder-usbnetgw2/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/noddos-0.5.5/src/Ipset.h:116:95: note: suggested alternative: 'ipset_session_report'
                 syslog (LOG_ERR, "Ipset: Can't commit for setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
                                                                                               ^~~~~~~~~~~~~~~~~~~
                                                                                               ipset_session_report
src/CMakeFiles/Identifier_test.dir/build.make:75: recipe for target 'src/CMakeFiles/Identifier_test.dir/DeviceProfile.cxx.o' failed
make[5]: *** [src/CMakeFiles/Identifier_test.dir/DeviceProfile.cxx.o] Error 1
make[5]: Leaving directory '/tank/openwrt/scratch/builder-usbnetgw2/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/noddos-0.5.5'
@blueveryday
Copy link

yes, I have the same to you.
Have no diea with it.

@cotequeiroz
Copy link
Member

cotequeiroz commented Mar 12, 2019

I have a tentative patch for this, but haven't run-tested it.
cotequeiroz@688462e
Despite the commit message, I'm not sure if I actually sumitted it to @StevenHessing.
If anyone can test this, I'll open a PR here and upstream (I do have the patch for upstream master).

@blueveryday
Copy link

I have a tentative patch for this, but haven't run-tested it.
cotequeiroz@688462e
Despite the commit message, I'm not sure if I actually sumitted it to @StevenHessing.
If anyone can test this, I'll open a PR here and upstream (I do have the patch for upstream master).

thank you sir.
it sucessed !
I had test your patches and makefile files,well done.

@cotequeiroz
Copy link
Member

Can you describe what tests have you run, so that I can properly document the PR?

@cotequeiroz
Copy link
Member

I meant if you actually ran the app in your router.

@blueveryday
Copy link

blueveryday commented Mar 15, 2019

I meant if you actually ran the app in your router.

I got some errors.....

root@OpenWrt:/tmp# opkg install noddos*.ipk
Installing noddos (0.5.5-2) to root...
Multiple packages (libpthread and libpthread) providing same name marked HOLD or PREFER. Using latest.
Collected errors:

  • satisfy_dependencies_for: Cannot satisfy the following dependencies for noddos:
  • kernel (= 4.14.105-1-c2ffef75bd3568dbfe7d18082c40258a) *
  • opkg_install_cmd: Cannot install package noddos.
    root@OpenWrt:/tmp#

and then , I compile the bin for my WR841v7 , including noddos and luci-app-noddos packages.
no errors up .
after flashed this bin , couldn't open 192.168.1.1 webpage.
I have no idea with it.......

@cotequeiroz
Copy link
Member

Can you get ssh access?
If so, what webserver are you using? Check that it is running. When using nginx, I sometimes end up with no /etc/nginx/luci_nginx.conf. I haven't studied what happens. I just remove /overlay/upper/etc/nginx/luci_nginx*.conf (this will restore luci_nginx.conf and luci_nginx_ssl.conf files). In my case, they are marked as removed, so they do not show up in /etc/nginx/. Make sure you backup that directory first, just to be sure. Then reboot.

@blueveryday
Copy link

Can you get ssh access?
If so, what webserver are you using? Check that it is running. When using nginx, I sometimes end up with no /etc/nginx/luci_nginx.conf. I haven't studied what happens. I just remove /overlay/upper/etc/nginx/luci_nginx*.conf (this will restore luci_nginx.conf and luci_nginx_ssl.conf files). In my case, they are marked as removed, so they do not show up in /etc/nginx/. Make sure you backup that directory first, just to be sure. Then reboot.

I remove the noddos and luci-app-noddos when compiling image.
flash it , It's run very well.

@cotequeiroz
Copy link
Member

So this does not fix it. Thank you for testing it.

@blueveryday
Copy link

So this does not fix it. Thank you for testing it.

You are welcome.
If you have new idea for it, I will be glad to test it.
Thank you so much.

@cotequeiroz
Copy link
Member

I've tried to run it, no avail. It appears that its website site (https://www.noddos.io/) is down. When the app starts up, it gets the device profiles from that website, and hangs trying to download it. @StevenHessing, what's the status of this?

@byoda
Copy link
Contributor

byoda commented Mar 19, 2019 via email

@byoda
Copy link
Contributor

byoda commented Mar 19, 2019 via email

@cotequeiroz
Copy link
Member

I've managed to test it some, and have posted noddos/noddos#53 with the ipset 7 changes to master. I will probably open a new one adjusting getnoddosdeviceprofiles to account for wget being provided by uclient-fetch, which does not support the --timestamping option.

@cotequeiroz
Copy link
Member

your mean is that noddos well done ?

It should work if you install wget, and the patch you've tried before. The reason why it was locking up before was because https://noddos.io/ was down. Now that's up again, it should work. The reason I asked you to install wget as well is that noddos uses a flag that's not available with uclient-fetch's implementation of wget.

@blueveryday
Copy link

your mean is that noddos well done ?

It should work if you install wget, and the patch you've tried before. The reason why it was locking up before was because https://noddos.io/ was down. Now that's up again, it should work. The reason I asked you to install wget as well is that noddos uses a flag that's not available with uclient-fetch's implementation of wget.

thank you very much .
I will test it.

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

Successfully merging a pull request may close this issue.

4 participants