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

OBS Fedora 40 build break #90

Open
trevorsandy opened this issue Jan 15, 2025 · 0 comments
Open

OBS Fedora 40 build break #90

trevorsandy opened this issue Jan 15, 2025 · 0 comments

Comments

@trevorsandy
Copy link
Contributor

Describe the bug

On OBS, Fedora builds fail if minizip-ng is not installed. This is to say, the build fails when minizip is installed. See Log Excerpt below.

This macro on TCUnzipStream.cpp, line 12 is to blame:

#ifdef HAVE_MINIZIP_NG
#define uLong unsigned long
#endif

There is only one occurrence uLong at line 89.

	std::vector<TCByte> extraBuf;
	if (info.size_file_extra != 0)
	{
		extraBuf.resize(info.size_file_extra);
		if (unzGetCurrentFileInfo64(zipFile, &info, NULL, 0, &extraBuf[0], (uLong)extraBuf.size(), NULL, 0) != UNZ_OK)
		{
			extraBuf.resize(0);
		}
	}

To Reproduce
Steps to reproduce the behavior:

  1. Build LDView on Fedora 40

Expected behavior
Successful build

Log Excerpt

[  123s] g++ -c -pipe -std=c++0x -O2 -fPIC -Wall -W -Wno-unused-parameter -Wno-parentheses -Wno-unused-variable -Wno-deprecated-declarations -Wno-return-type -Wno-sign-compare -Wno-uninitialized -Wno-unused-result -Wno-clobbered -D_REENTRANT -D_OSMESA -DEXPORT_3DS -DHAVE_MINIZIP -D_GNU_SOURCE -DUSE_CPP11 -D_NO_BOOST -DHAVE_MINIZIP -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I. -I.. -I/usr/include -I/usr/include -I/usr/include -I/usr/include/qt5 -I/usr/include/qt5/QtOpenGL -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I. -I/../lib64/qt5/mkspecs/linux-g++ -o 64bit_release/.obj-osmesa/TCUnzipStream.o TCUnzipStream.cpp
[  123s] TCUnzipStream.cpp: In member function ‘time_t TCUnzipStream::getTimestamp(const std::string&, unzFile, const std::string&)’:
[  123s] TCUnzipStream.cpp:87:85: error: ‘uLong’ was not declared in this scope; did you mean ‘ulong’?
[  123s]    87 |                 if (unzGetCurrentFileInfo64(zipFile, &info, NULL, 0, &extraBuf[0], (uLong)extraBuf.size(), NULL, 0) != UNZ_OK)
[  123s]       |                                                                                     ^~~~~
[  123s]       |                                                                                     ulong
[  123s] make[1]: *** [Makefile.osmesa:740: 64bit_release/.obj-osmesa/TCUnzipStream.o] Error 1
[  123s] make[1]: Leaving directory '/home/abuild/rpmbuild/BUILD/ldview/TCFoundation'
[  123s] make: *** [Makefile:184: sub-TCFoundation_CUI_OSMesa-make_first-ordered] Error 2

Platform (please complete the following information):

  • OS: Linux Fedora
  • Version: 40
  • CPU Architecture: x86-64
  • Platform: Open Build Service

Solution Suggestion
Perhaps this macro could be made conditional so implementations of minizip, versus minizip-ng, will not cause a build break ?

For example:

#ifdef HAVE_MINIZIP_NG
#define uLong unsigned long
#elif defined HAVE_MINIZIP
#define uLong unsigned int
#endif

Cheers,

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

1 participant