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

Provide more prereqs for linux+mingw builds #1473

Open
4 of 8 tasks
jimklimov opened this issue Jul 13, 2022 · 8 comments
Open
4 of 8 tasks

Provide more prereqs for linux+mingw builds #1473

jimklimov opened this issue Jul 13, 2022 · 8 comments
Labels
CI Entries related to continuous integration infrastructure (historically also recipes like Makefiles) cross-builds Windows

Comments

@jimklimov
Copy link
Member

jimklimov commented Jul 13, 2022

Current configure script reports (on a container prepared per scripts/Windows/README instructions, build handled by the accompanying script) the following build ability:

Configuration summary:
======================
build serial drivers: yes 
build USB drivers: yes (libusb-0.1-config)
build neon based XML driver: no 
enable Avahi support: no 
build Powerman PDU client driver: no 
build Modbus driver: no 
build IPMI driver: no 
build Mac OS X meta-driver: no 
build i2c based drivers: no 
enable SSL support: no 
enable libwrap (tcp-wrappers) support: no 
enable libltdl (Libtool dlopen abstraction) support: yes 
build nut-scanner: yes
build CGI programs: no 
build and install documentation: man=auto 
build specific documentation format(s): yes  man
build and install the development files: yes 
build SNMP drivers: yes 
------------------
Compiler settings:
CC      	:x86_64-w64-mingw32-gcc
CFLAGS  	:-isystem /usr/local/include  -D_POSIX=1 -D_POSIX_C_SOURCE=200112L -I/usr/x86_64-w64-mingw32/include/ -D_WIN32_WINNT=0xffff -Wno-reserved-identifier -Wno-unknown-warning-option -std=gnu99 -Wno-system-headers -Wall -Wextra -Wsign-compare -pedantic -Wno-format -Werror
CXX     	:x86_64-w64-mingw32-g++
CXXFLAGS	:-isystem /usr/local/include  -D_POSIX=1 -D_POSIX_C_SOURCE=200112L -I/usr/x86_64-w64-mingw32/include/ -D_WIN32_WINNT=0xffff -Wno-reserved-identifier -Wno-unknown-warning-option -std=gnu++11 -Wno-system-headers -Wall -Wextra -Wno-format -Werror
CPP     	:x86_64-w64-mingw32-gcc -E
CPPFLAGS	:

Notably this container (and instruction) lacks some presumably low-hanging fruits, such as:

  • libneon (XML)
  • libgd (CGI)
  • ssl (nss or openssl)
  • modbus (is it usable here? at least MSYS2 serves it enough for NUT to build against)

Some possibly harder targets would be:

  • avahi (announce/find NUT services)
  • ipmi (address this blade system's chassis as an ePDU abstraction)
  • powerman (niche deployments?)
  • libwrap (TCP security... if available?)
@jimklimov jimklimov added Windows CI Entries related to continuous integration infrastructure (historically also recipes like Makefiles) cross-builds labels Jul 13, 2022
@jimklimov jimklimov moved this to Todo in NUT for Windows Jul 13, 2022
@jimklimov
Copy link
Member Author

jimklimov commented Jul 23, 2022

Documented prerequisites for libmodbus (see also nut#1515) and libgd (except fontconfig due to ICU; CGI bins build - no idea how usable the result is).

libwrap seems to be antiquated by now, many OSes are removing it from default daemons.

libneon and libavahi wanted some non-trivial work to proceed.

  • A rebuild of net-snmp stopped working (can't resolve some symbols like inet_hton) so NUT configure script fails to confirm a working init_snmp - probably more linking in pkg-config is needed? Or compare the snmp-config script with PC file...

@jimklimov
Copy link
Member Author

jimklimov commented Jul 24, 2022

Analysis update: net-snmp is built statically (not dll) for mingw, so that needed a differrent pkg-config query. My earlier experiments just patched netsnmp.pc file. Now it is part of NUT m4 recipes logic.

@jimklimov
Copy link
Member Author

To cross-build libneon from source/git in mingw on Linux, some fixes are needed - posted as notroj/neon#84

@jimklimov jimklimov moved this from Todo to In Progress in NUT for Windows Aug 9, 2022
@jimklimov
Copy link
Member Author

Openssl-1.1.1 covered

@jimklimov
Copy link
Member Author

Avahi is a huge snowball with libintl/gettext, libpcre, glib2... not a low-hanging fruit.

@jimklimov
Copy link
Member Author

FreeIPMI wants libgcrypt (maybe doable, also quickly avoidable --without-encryption as far as build dependency for NUT goes) and getpwuid_r for SDR cache (can be avoided in configure.ac to not error out) :
But then its headers just want e.g. <sys/socket.h> with no options for winsock, so also not a low-hanging fruit.

@jimklimov
Copy link
Member Author

Want to revise net-snmp build vs (presumably shared-DLL) report in

@jimklimov jimklimov moved this from In Progress to Todo in NUT for Windows Aug 22, 2022
@jimklimov
Copy link
Member Author

Suggestions there proved helpful, the big make LDFLAGS=... was a good starting point (all other things equal)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Entries related to continuous integration infrastructure (historically also recipes like Makefiles) cross-builds Windows
Projects
Status: Todo
Development

No branches or pull requests

1 participant