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

miniupnpc.mk: missing header bsdqueue.h #1051

Closed
pavelvat opened this issue Dec 12, 2015 · 5 comments
Closed

miniupnpc.mk: missing header bsdqueue.h #1051

pavelvat opened this issue Dec 12, 2015 · 5 comments

Comments

@pavelvat
Copy link
Contributor

mxe/usr/i686-w64-mingw32.shared/include/miniupnpc/upnpreplyparse.h:12:22: fatal error: bsdqueue.h: No such file or directory

@starius
Copy link
Member

starius commented Dec 12, 2015

They code of the header is as follows:

// usr/i686-w64-mingw32.shared/include/miniupnpc/upnpreplyparse.h
#if defined(NO_SYS_QUEUE_H) || defined(_WIN32) || defined(__HAIKU__)
#include "bsdqueue.h"
#else
#include <sys/queue.h>
#endif

Can you provide a code sample and a compilation command, please?

@pavelvat
Copy link
Contributor Author

Can you provide a code sample and a compilation command, please?

Just line:

 #include <miniupnpc/upnpcommands.h> 

bsdqueue.h is present in miniupnpc-1.9.tar.gz tarball.

@starius
Copy link
Member

starius commented Dec 12, 2015

bsdqueue.h was installed in the commit:

+# We can build the whole package, but only make libminiupnpc.a. Rest makes little sense.
+define $(PKG)_BUILD
+    cd '$(1)' && $(SH) ./updateminiupnpcstrings.sh
+    $(MAKE) -C '$(1)' -f Makefile.mingw -j '$(JOBS)' \
+        CC='$(TARGET)-gcc' \
+        AR='$(TARGET)-ar' \
+        RANLIB='$(TARGET)-ranlib' \
+        DLLWRAP='$(TARGET)-dllwrap' \
+        init libminiupnpc.a miniupnpc.dll
+    $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib'
+    $(INSTALL) -m644 '$(1)/libminiupnpc.a' '$(PREFIX)/$(TARGET)/lib/'
+    $(INSTALL) -m644 '$(1)/miniupnpc.lib' '$(PREFIX)/$(TARGET)/lib/'
+    $(INSTALL) -d '$(PREFIX)/$(TARGET)/bin'
+    $(INSTALL) -m755 '$(1)/miniupnpc.dll' '$(PREFIX)/$(TARGET)/bin/'
+    $(INSTALL) -d '$(PREFIX)/$(TARGET)/include'
+    $(INSTALL) -d '$(PREFIX)/$(TARGET)/include/miniupnpc'
+    $(INSTALL) -m644 '$(1)/bsdqueue.h' '$(PREFIX)/$(TARGET)/include/'
+    $(INSTALL) -m644 '$(1)/declspec.h' '$(PREFIX)/$(TARGET)/include/miniupnpc/'
+    $(INSTALL) -m644 '$(1)/igd_desc_parse.h' '$(PREFIX)/$(TARGET)/include/miniupnpc/'
+    $(INSTALL) -m644 '$(1)/miniupnpc.h' '$(PREFIX)/$(TARGET)/include/miniupnpc/'
+    $(INSTALL) -m644 '$(1)/miniupnpctypes.h' '$(PREFIX)/$(TARGET)/include/miniupnpc/'
+    $(INSTALL) -m644 '$(1)/miniwget.h' '$(PREFIX)/$(TARGET)/include/miniupnpc/'
+    $(INSTALL) -m644 '$(1)/portlistingparse.h' '$(PREFIX)/$(TARGET)/include/miniupnpc/'
+    $(INSTALL) -m644 '$(1)/upnpcommands.h' '$(PREFIX)/$(TARGET)/include/miniupnpc/'
+    $(INSTALL) -m644 '$(1)/upnperrors.h' '$(PREFIX)/$(TARGET)/include/miniupnpc/'
+    $(INSTALL) -m644 '$(1)/upnpreplyparse.h' '$(PREFIX)/$(TARGET)/include/miniupnpc/'
+endef

But it was lost in the subsequent commit (switch to cmake).

CMakeLists.txt installs the following headers:

install (FILES
  miniupnpc.h
  miniwget.h
  upnpcommands.h
  igd_desc_parse.h
  upnpreplyparse.h
  upnperrors.h
  declspec.h
  DESTINATION include/miniupnpc
)

Some headers used to be installed manually in the initial commit are not installed by cmake:

  • bsdqueue.h
  • miniupnpctypes.h
  • portlistingparse.h

By the way there are also 6 header files not installed even in the initial commit:

  • codelength.h
  • minisoap.h
  • connecthostport.h
  • minissdpc.h
  • minixml.h
  • receivedata.h

We should do the following:

  • remove file src/miniupnpc-build-1.patch which is not used anymore
  • add 3 (or 9) files listed above to CMakeLists.txt
  • report this problem to upstream

@BioMike
Copy link
Contributor

BioMike commented Dec 13, 2015

I was the person that did the initial commit for this package. I'm not sure why the cmake build was added to this package, because I thought it was too experimental for this version. The 2 headers (miniupnpctypes.h and portlistingparse.h) are installed in the current miniupnpc github HEAD, bsdqueue.h is not more needed and removed in commit miniupnp/miniupnp@a80c87f . As for the 6 other header files, I think they are only needed at build time of miniupnpc and should not be used in your project.

Updating to the latest non-release version should solve this issue.

starius added a commit to LuaAndC/mxe that referenced this issue Dec 13, 2015
It is not used after eb20723,
in which Makefile based installation was replaced with CMake
based installation.

See mxe#1051 (comment)
starius added a commit to LuaAndC/mxe that referenced this issue Dec 13, 2015
@starius
Copy link
Member

starius commented Dec 13, 2015

Updating to the latest non-release version should solve this issue.

I would prefer not to use non-release version if it is possible.

I have removed unused patch miniupnpc-build-1.patch and added a patch adding bsdqueue.h, miniupnpctypes.h and portlistingparse.h to installation list of CMake. I am building it now, then I am going to check compilation of #include <miniupnpc/upnpcommands.h> and make a pull request.

starius added a commit to LuaAndC/mxe that referenced this issue Dec 13, 2015
@starius starius mentioned this issue Dec 13, 2015
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

3 participants