pupnp / pupnp

libupnp: Build UPnP-compliant control points, devices, and bridges on several operating systems.
https://pupnp.github.io/pupnp
BSD 3-Clause "New" or "Revised" License
349 stars 114 forks source link

Release tarball missing files #419

Closed ctreleaven closed 1 year ago

ctreleaven commented 1 year ago

Trying to build libupnp 1.14.14 for MacPorts with the tarball from releases but configure fails due to missing files, as follows:

Executing:  cd "/opt/local/var/macports/build/_Users_craigtreleaven_mp_macports-ports_devel_libupnp/libupnp/work/build" && /opt/local/bin/cmake -G "CodeBlocks - Unix Makefiles" -DCMAKE_BUILD_TYPE=MacPorts -DCMAKE_INSTALL_PREFIX="/opt/local" -DCMAKE_INSTALL_NAME_DIR="/opt/local/lib" -DCMAKE_SYSTEM_PREFIX_PATH="/opt/local;/usr" -DCMAKE_C_COMPILER="$CC" -DCMAKE_CXX_COMPILER="$CXX" -DCMAKE_OBJC_COMPILER="$CC" -DCMAKE_OBJCXX_COMPILER="$CXX" -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_POLICY_DEFAULT_CMP0060=NEW -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_MAKE_PROGRAM=/usr/bin/make -DCMAKE_MODULE_PATH="/opt/local/share/cmake/Modules" -DCMAKE_PREFIX_PATH="/opt/local/share/cmake/Modules" -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON -DCMAKE_INSTALL_RPATH="/opt/local/lib" -Wno-dev -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.15" -DCMAKE_OSX_SYSROOT="/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk" /opt/local/var/macports/build/_Users_craigtreleaven_mp_macports-ports_devel_libupnp/libupnp/work/libupnp-1.14.14 
DEBUG: system:  cd "/opt/local/var/macports/build/_Users_craigtreleaven_mp_macports-ports_devel_libupnp/libupnp/work/build" && /opt/local/bin/cmake -G "CodeBlocks - Unix Makefiles" -DCMAKE_BUILD_TYPE=MacPorts -DCMAKE_INSTALL_PREFIX="/opt/local" -DCMAKE_INSTALL_NAME_DIR="/opt/local/lib" -DCMAKE_SYSTEM_PREFIX_PATH="/opt/local;/usr" -DCMAKE_C_COMPILER="$CC" -DCMAKE_CXX_COMPILER="$CXX" -DCMAKE_OBJC_COMPILER="$CC" -DCMAKE_OBJCXX_COMPILER="$CXX" -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_POLICY_DEFAULT_CMP0060=NEW -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_MAKE_PROGRAM=/usr/bin/make -DCMAKE_MODULE_PATH="/opt/local/share/cmake/Modules" -DCMAKE_PREFIX_PATH="/opt/local/share/cmake/Modules" -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON -DCMAKE_INSTALL_RPATH="/opt/local/lib" -Wno-dev -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.15" -DCMAKE_OSX_SYSROOT="/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk" /opt/local/var/macports/build/_Users_craigtreleaven_mp_macports-ports_devel_libupnp/libupnp/work/libupnp-1.14.14 
-- Found Git: /opt/local/bin/git (found version "2.38.1") 
CMake Error at CMakeLists.txt:10 (include):
  include could not find requested file:

    cmake/test-functions.cmake

CMake Error at CMakeLists.txt:11 (include):
  include could not find requested file:

    cmake/autoheader.cmake

CMake Warning at CMakeLists.txt:13 (project):
  VERSION keyword not followed by a value or was followed by a value that
  expanded to nothing.

-- The C compiler identification is AppleClang 12.0.0.12000032
-- The CXX compiler identification is AppleClang 12.0.0.12000032
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:16 (include):
  include could not find requested file:

    cmake/options.cmake

-- Looking for sys/socket.h
-- Looking for sys/socket.h - found
-- Looking for ws2tcpip.h
-- Looking for ws2tcpip.h - not found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of socklen_t
-- Check size of socklen_t - done
-- Check size of off_t
-- Check size of off_t - done
-- System uses 64 bit, no flags needed
-- Looking for fseeko
-- Looking for fseeko - found
-- Looking for strnlen
-- Looking for strnlen - found
-- Looking for strndup
-- Looking for strndup - found
-- Performing Test HAVE_MACRO_PREFIX_MAP
-- Performing Test HAVE_MACRO_PREFIX_MAP - Success
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Check size of pthread_rwlock_t
-- Check size of pthread_rwlock_t - done
CMake Error: File /opt/local/var/macports/build/_Users_craigtreleaven_mp_macports-ports_devel_libupnp/libupnp/work/build/autoconfig.h.cm does not exist.
CMake Error at CMakeLists.txt:250 (configure_file):
  configure_file Problem configuring file

CMake Error at /opt/local/share/cmake-3.23/Modules/WriteBasicConfigVersionFile.cmake:43 (message):
  No VERSION specified for WRITE_BASIC_CONFIG_VERSION_FILE()
Call Stack (most recent call first):
  /opt/local/share/cmake-3.23/Modules/CMakePackageConfigHelpers.cmake:237 (write_basic_config_version_file)
  CMakeLists.txt:266 (write_basic_package_version_file)

-- Configuring incomplete, errors occurred!
See also "/opt/local/var/macports/build/_Users_craigtreleaven_mp_macports-ports_devel_libupnp/libupnp/work/build/CMakeFiles/CMakeOutput.log".
See also "/opt/local/var/macports/build/_Users_craigtreleaven_mp_macports-ports_devel_libupnp/libupnp/work/build/CMakeFiles/CMakeError.log".
Command failed:  cd "/opt/local/var/macports/build/_Users_craigtreleaven_mp_macports-ports_devel_libupnp/libupnp/work/build" && /opt/local/bin/cmake -G "CodeBlocks - Unix Makefiles" -DCMAKE_BUILD_TYPE=MacPorts -DCMAKE_INSTALL_PREFIX="/opt/local" -DCMAKE_INSTALL_NAME_DIR="/opt/local/lib" -DCMAKE_SYSTEM_PREFIX_PATH="/opt/local;/usr" -DCMAKE_C_COMPILER="$CC" -DCMAKE_CXX_COMPILER="$CXX" -DCMAKE_OBJC_COMPILER="$CC" -DCMAKE_OBJCXX_COMPILER="$CXX" -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_POLICY_DEFAULT_CMP0060=NEW -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_MAKE_PROGRAM=/usr/bin/make -DCMAKE_MODULE_PATH="/opt/local/share/cmake/Modules" -DCMAKE_PREFIX_PATH="/opt/local/share/cmake/Modules" -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON -DCMAKE_INSTALL_RPATH="/opt/local/lib" -Wno-dev -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.15" -DCMAKE_OSX_SYSROOT="/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk" /opt/local/var/macports/build/_Users_craigtreleaven_mp_macports-ports_devel_libupnp/libupnp/work/libupnp-1.14.14 
Exit code: 1
Error: Failed to configure libupnp: consult /opt/local/var/macports/build/_Users_craigtreleaven_mp_macports-ports_devel_libupnp/libupnp/work/build/CMakeFiles/CMakeError.log
Error: Failed to configure libupnp: configure failure: command execution failed
Vollstrecker commented 1 year ago

Right, the files didn't find their way into the tarball that's mirrored to sourceforge. I just wonder if macports is not able to use the zip from github, or even better, why it can't just be pointed directly to the release-tag?

ctreleaven commented 1 year ago

MacPorts prefers bz2 archives where possible since they're typically a fair bit smaller. (We package several thousand open source projects.)

I'd prefer to keep using the Github release tarball since that's worked well for some time now. It appears we're not the only ones who uses Github releases:

https://repology.org/project/libupnp/information

Is it a problem to do a new release including the missing files?

mrjimenez commented 1 year ago

The tarball in sourceforge is supposed to be an automatic copy of the tarball here in GitHub. If it is not, then there is a problem with the process.

mrjimenez commented 1 year ago

I'd prefer to keep using the Github release tarball since that's worked well for some time now. It appears Is it a problem to do a new release including the missing files?

Not at all. But I need to know what went wrong.

The bz2 file has been generated by me with make distcheck. Then I generate the .bz2.sha1 file by hand too.

Which are the missing files? Maybe they are not in the autotools file list, we could fix that easily.

ctreleaven commented 1 year ago

In the configure phase, cmake is complaining that the following files are missing:

Vollstrecker commented 1 year ago

Log says cmake/test-functions.cmake, cmake/autoheader.cmake and cmake/options.cmake but it doesn't go any further. So basically 3/4 of the cmake dir. I remember we talked about something like that, but maybe in the other branch.

mrjimenez commented 1 year ago

@ctreleaven ,

Please check 1.14.15 and close this issue if solved.

Regards, Marcelo.

ctreleaven commented 1 year ago

Thank you for the quick turnaround, the new release seems to be working well.

Just fyi, our project has a fleet of buildbots to test building each project ("port") on various Mac archs and OS versions. libupnp is still waiting in the backlog for a few of the buildbots but it has now built successfully on Apple Silicone with recent OS versions as well as Intel (both 64-bit and ancient 32-bit platforms). Appropriate versions of clang are used on all of these builders.

In case it helps, clang does note a warning during the build. For example, building on macOS 12.2.1 on Apple silicone, the following warning is issued:

/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_libupnp/libupnp/work/libupnp-1.14.15/upnp/src/threadutil/ThreadPool.c:431:3: warning: cast to smaller integer type 'unsigned int' from 'pthread_t _Nonnull' (aka 'struct _opaque_pthread_t *') [-Wpointer-to-int-cast]
1 warning generated.
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_libupnp/libupnp/work/libupnp-1.14.15/upnp/src/threadutil/ThreadPool.c:431:3: warning: cast to smaller integer type 'unsigned int' from 'pthread_t _Nonnull' (aka 'struct _opaque_pthread_t *') [-Wpointer-to-int-cast]
1 warning generated.

Full build log is here: https://build.macports.org/builders/ports-12_arm64-builder/builds/72938/steps/install-port/logs/main.log (These logs will be deleted after a few weeks.)

A similar warnings seem to be issued on the other builders. This is not a show-stopper but I thought you might like to know.

Thanks again.

mrjimenez commented 1 year ago

Hi Craig,

Thank you for your report and the error message. I have no way to test it here, but if you send a tested pull request, I can accept it. The typecasts are there just to generate the seed for the srand() function, so you could probably change them to unsigned long and the message should go away. Maybe you will need an extra typecast to unsigned int because the parameter of srand() is unsigned int. Something like this:

#elif defined(BSD) || defined(__APPLE__) || defined(__FreeBSD_kernel__)
    srand((unsigned int)((unsigned long)t.tv_usec +
        (unsigned long)ithread_get_current_thread_id()));

Best regards, Marcelo.