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

Compil fail #157

Open
PowaBanga opened this issue Nov 4, 2023 · 5 comments
Open

Compil fail #157

PowaBanga opened this issue Nov 4, 2023 · 5 comments

Comments

@PowaBanga
Copy link

Hi, I am on archlinux, updated, and the compilation fail :

checking that the build tools exist
Checking for /bin/sh (bash (or another shell))... found.
Checking for echo (coreutils)... found.
Checking for echo -n (coreutils)... found.
Checking for cat (coreutils)... found.
Checking for mkdir -p (coreutils)... found.
Checking for cp (coreutils)... found.
Checking for cp -r (coreutils)... found.
Checking for rm -f (coreutils)... found.
Checking for rm -f -r (coreutils)... found.
Checking for mv (coreutils)... found.
Checking for echo test | tee /dev/stderr (coreutils)... found.
Checking for sed (sed)... found.
Checking for find (findutils)... found.
Checking for diff (diff)... found.
Checking for cc (gcc)... found.
Checking for g++ (g++)... found.
Checking for ranlib (binutils)... found.
Checking for ar (binutils)... found.
Checking for pkg-config (pkg-config)... found.
Checking for unzip (unzip)... found.
Checking for git (git-core)... found.
Checking for svn (subversion)... found.
Checking for wget (wget)... found.
Checking for ldd  (libc6)... found.
All required tools have been found!

checking that the dependencies exist
Checking for jpeglib.h (libjpeg8-dev)... found and links.
Checking for glib.h (libglib2.0-dev)... found and links.
Checking for libxml/xpath.h (libxml2-dev)... found and links.
Checking for png.h (libpng12-dev)... found and links.
Checking for GL/gl.h (mesa-common-dev (or another OpenGL library))... found and links.
Checking for QCoreApplication (Qt5Core)... found and links.
Checking for QGuiApplication (Qt5Gui)... found and links.
Checking for QApplication (Qt5Widgets)... found and links.
Checking for dlfcn.h (libc6-dev)... found and links.
Checking for zlib.h (zlib1g-dev)... found and links.
All required libraries have been found!

g++ libs/quickhull/QuickHull.cpp -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -MMD -W -Wall -Wcast-align -Wcast-qual -Wno-unused-parameter -fno-strict-aliasing -fPIC -std=c++17 -Wreorder -fno-exceptions -fno-rtti -Ilibs -DNDEBUG -DPOSIX -DXWINDOWS -DRADIANT_VERSION="\"1.6.0n-git-78f8977\"" -DRADIANT_MAJOR_VERSION="\"6\"" -DRADIANT_MINOR_VERSION="\"0\"" -DRADIANT_ABOUTMSG="\"Custom build\"" -DQ3MAP_VERSION="\"2.5.17n-git-78f8977\"" -DRADIANT_EXECUTABLE="\"x86_64\""  -c -o libs/quickhull/QuickHull.o
Dans le fichier inclus depuis libs/quickhull/QuickHull.hpp:10,
                 depuis libs/quickhull/QuickHull.cpp:1:
libs/quickhull/Structs/Mesh.hpp:43:30: erreur: « uint8_t » dans l'espace de noms « std » ne nomme pas un type; vouliez-vous utiliser « wint_t » ?
   43 |                         std::uint8_t m_isVisibleFaceOnCurrentIteration : 1;
      |                              ^~~~~~~
      |                              wint_t
libs/quickhull/Structs/Mesh.hpp:44:30: erreur: « uint8_t » dans l'espace de noms « std » ne nomme pas un type; vouliez-vous utiliser « wint_t » ?
   44 |                         std::uint8_t m_inFaceStack : 1;
      |                              ^~~~~~~
      |                              wint_t
libs/quickhull/Structs/Mesh.hpp:45:30: erreur: « uint8_t » dans l'espace de noms « std » ne nomme pas un type; vouliez-vous utiliser « wint_t » ?
   45 |                         std::uint8_t m_horizonEdgesOnCurrentIteration : 3; // Bit for each half edge assigned to this face, each being 0 or 1 depending on whether the edge belongs to horizon edge
      |                              ^~~~~~~
      |                              wint_t
libs/quickhull/Structs/Mesh.hpp: Dans le constructeur « quickhull::MeshBuilder<T>::Face::Face() »:
libs/quickhull/Structs/Mesh.hpp:52:42: erreur: la classe « quickhull::MeshBuilder<T>::Face » n'a aucun champ nommé « m_isVisibleFaceOnCurrentIteration »
   52 |                                          m_isVisibleFaceOnCurrentIteration(0),
      |                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libs/quickhull/Structs/Mesh.hpp:53:42: erreur: la classe « quickhull::MeshBuilder<T>::Face » n'a aucun champ nommé « m_inFaceStack »
   53 |                                          m_inFaceStack(0),
      |                                          ^~~~~~~~~~~~~
libs/quickhull/Structs/Mesh.hpp:54:42: erreur: la classe « quickhull::MeshBuilder<T>::Face » n'a aucun champ nommé « m_horizonEdgesOnCurrentIteration »
   54 |                                          m_horizonEdgesOnCurrentIteration(0)
      |                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libs/quickhull/QuickHull.cpp: Dans la fonction membre « void quickhull::QuickHull<FloatType>::createConvexHalfEdgeMesh() »:
libs/quickhull/QuickHull.cpp:177:44: erreur: « int8_t » dans l'espace de noms « std » ne nomme pas un type; vouliez-vous utiliser « wint_t » ?
  177 |                                 const std::int8_t ind = (halfEdges[0]==faceData.m_enteredFromHalfEdge) ? 0 : (halfEdges[1]==faceData.m_enteredFromHalfEdge ? 1 : 2);
      |                                            ^~~~~~
      |                                            wint_t
libs/quickhull/QuickHull.cpp:178:147: erreur: « ind » n'a pas été déclaré dans cette portée; vouliez-vous employer « int » ?
  178 |                                 m_mesh.m_faces[m_mesh.m_halfEdges[faceData.m_enteredFromHalfEdge].m_face].m_horizonEdgesOnCurrentIteration |= (1<<ind);
      |                                                                                                                                                   ^~~
      |                                                                                                                                                   int
libs/quickhull/QuickHull.hpp: Dans l'instanciation de « std::unique_ptr<std::vector<long unsigned int> > quickhull::QuickHull<FloatType>::getIndexVectorFromPool() [with FloatType = float] » :
libs/quickhull/QuickHull.cpp:499:17:   requis depuis ici
libs/quickhull/QuickHull.hpp:164:22: attention: déplacer un objet temporaire empêche l'élision de la copie [-Wpessimizing-move]
  164 |                 auto r = std::move(m_indexVectorPool.get());
      |                      ^
libs/quickhull/QuickHull.hpp:164:22: note: supprime l'appel à « std::move »
libs/quickhull/QuickHull.cpp: Dans l'instanciation de « void quickhull::QuickHull<FloatType>::createConvexHalfEdgeMesh() [with FloatType = float] » :
libs/quickhull/QuickHull.cpp:499:17:   requis depuis ici
libs/quickhull/QuickHull.cpp:109:35: erreur: « struct quickhull::MeshBuilder<float>::Face » n'a pas de membre nommé « m_inFaceStack »
  109 |                                 f.m_inFaceStack = 1;
      |                                 ~~^~~~~~~~~~~~~
libs/quickhull/QuickHull.cpp:127:28: erreur: « struct quickhull::MeshBuilder<float>::Face » n'a pas de membre nommé « m_inFaceStack »
  127 |                         tf.m_inFaceStack = 0;
      |                         ~~~^~~~~~~~~~~~~
libs/quickhull/QuickHull.cpp:150:49: erreur: « struct quickhull::MeshBuilder<float>::Face » n'a pas de membre nommé « m_isVisibleFaceOnCurrentIteration »
  150 |                                         if (pvf.m_isVisibleFaceOnCurrentIteration) {
      |                                             ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libs/quickhull/QuickHull.cpp:159:53: erreur: « struct quickhull::MeshBuilder<float>::Face » n'a pas de membre nommé « m_isVisibleFaceOnCurrentIteration »
  159 |                                                 pvf.m_isVisibleFaceOnCurrentIteration = 1;
      |                                                 ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libs/quickhull/QuickHull.cpp:160:53: erreur: « struct quickhull::MeshBuilder<float>::Face » n'a pas de membre nommé « m_horizonEdgesOnCurrentIteration »
  160 |                                                 pvf.m_horizonEdgesOnCurrentIteration = 0;
      |                                                 ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libs/quickhull/QuickHull.cpp:173:37: erreur: « struct quickhull::MeshBuilder<float>::Face » n'a pas de membre nommé « m_isVisibleFaceOnCurrentIteration »
  173 |                                 pvf.m_isVisibleFaceOnCurrentIteration = 0;
      |                                 ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libs/quickhull/QuickHull.cpp:205:59: erreur: « struct quickhull::MeshBuilder<float>::Face » n'a pas de membre nommé « m_horizonEdgesOnCurrentIteration »
  205 |                                         if ((disabledFace.m_horizonEdgesOnCurrentIteration & (1<<j)) == 0) {
      |                                              ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libs/quickhull/QuickHull.cpp:219:38: attention: déplacer un objet temporaire empêche l'élision de la copie [-Wpessimizing-move]
  219 |                                 auto t = std::move(m_mesh.disableFace(faceIndex));
      |                                      ^
libs/quickhull/QuickHull.cpp:219:38: note: supprime l'appel à « std::move »
libs/quickhull/QuickHull.cpp:291:54: erreur: « struct quickhull::MeshBuilder<float>::Face » n'a pas de membre nommé « m_inFaceStack »
  291 |                                         if (!newFace.m_inFaceStack) {
      |                                              ~~~~~~~~^~~~~~~~~~~~~
libs/quickhull/QuickHull.cpp:293:57: erreur: « struct quickhull::MeshBuilder<float>::Face » n'a pas de membre nommé « m_inFaceStack »
  293 |                                                 newFace.m_inFaceStack = 1;
      |                                                 ~~~~~~~~^~~~~~~~~~~~~
libs/quickhull/QuickHull.hpp: Dans l'instanciation de « std::unique_ptr<std::vector<long unsigned int> > quickhull::QuickHull<FloatType>::getIndexVectorFromPool() [with FloatType = double] » :
libs/quickhull/QuickHull.cpp:500:17:   requis depuis ici
libs/quickhull/QuickHull.hpp:164:22: attention: déplacer un objet temporaire empêche l'élision de la copie [-Wpessimizing-move]
  164 |                 auto r = std::move(m_indexVectorPool.get());
      |                      ^
libs/quickhull/QuickHull.hpp:164:22: note: supprime l'appel à « std::move »
libs/quickhull/QuickHull.cpp: Dans l'instanciation de « void quickhull::QuickHull<FloatType>::createConvexHalfEdgeMesh() [with FloatType = double] » :
libs/quickhull/QuickHull.cpp:500:17:   requis depuis ici
libs/quickhull/QuickHull.cpp:109:35: erreur: « struct quickhull::MeshBuilder<double>::Face » n'a pas de membre nommé « m_inFaceStack »
  109 |                                 f.m_inFaceStack = 1;
      |                                 ~~^~~~~~~~~~~~~
libs/quickhull/QuickHull.cpp:127:28: erreur: « struct quickhull::MeshBuilder<double>::Face » n'a pas de membre nommé « m_inFaceStack »
  127 |                         tf.m_inFaceStack = 0;
      |                         ~~~^~~~~~~~~~~~~
libs/quickhull/QuickHull.cpp:150:49: erreur: « struct quickhull::MeshBuilder<double>::Face » n'a pas de membre nommé « m_isVisibleFaceOnCurrentIteration »
  150 |                                         if (pvf.m_isVisibleFaceOnCurrentIteration) {
      |                                             ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libs/quickhull/QuickHull.cpp:159:53: erreur: « struct quickhull::MeshBuilder<double>::Face » n'a pas de membre nommé « m_isVisibleFaceOnCurrentIteration »
  159 |                                                 pvf.m_isVisibleFaceOnCurrentIteration = 1;
      |                                                 ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libs/quickhull/QuickHull.cpp:160:53: erreur: « struct quickhull::MeshBuilder<double>::Face » n'a pas de membre nommé « m_horizonEdgesOnCurrentIteration »
  160 |                                                 pvf.m_horizonEdgesOnCurrentIteration = 0;
      |                                                 ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libs/quickhull/QuickHull.cpp:173:37: erreur: « struct quickhull::MeshBuilder<double>::Face » n'a pas de membre nommé « m_isVisibleFaceOnCurrentIteration »
  173 |                                 pvf.m_isVisibleFaceOnCurrentIteration = 0;
      |                                 ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libs/quickhull/QuickHull.cpp:205:59: erreur: « struct quickhull::MeshBuilder<double>::Face » n'a pas de membre nommé « m_horizonEdgesOnCurrentIteration »
  205 |                                         if ((disabledFace.m_horizonEdgesOnCurrentIteration & (1<<j)) == 0) {
      |                                              ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libs/quickhull/QuickHull.cpp:219:38: attention: déplacer un objet temporaire empêche l'élision de la copie [-Wpessimizing-move]
  219 |                                 auto t = std::move(m_mesh.disableFace(faceIndex));
      |                                      ^
libs/quickhull/QuickHull.cpp:219:38: note: supprime l'appel à « std::move »
libs/quickhull/QuickHull.cpp:291:54: erreur: « struct quickhull::MeshBuilder<double>::Face » n'a pas de membre nommé « m_inFaceStack »
  291 |                                         if (!newFace.m_inFaceStack) {
      |                                              ~~~~~~~~^~~~~~~~~~~~~
libs/quickhull/QuickHull.cpp:293:57: erreur: « struct quickhull::MeshBuilder<double>::Face » n'a pas de membre nommé « m_inFaceStack »
  293 |                                                 newFace.m_inFaceStack = 1;
      |                                                 ~~~~~~~~^~~~~~~~~~~~~
make: *** [Makefile:506: libs/quickhull/QuickHull.o] Error 1
==> ERREUR : Une erreur s’est produite dans build().

Does anybody have an idea why ?

@Garux
Copy link
Owner

Garux commented Nov 4, 2023

1st error makes no sense, std::uint8_t is in #include <cstdint>
Compiler args are sus, i do not recall project defining them, did you add them?
This could have change behavior that much.

@PowaBanga
Copy link
Author

PowaBanga commented Nov 6, 2023

No, here is my build script :

pkgname=netradiant-custom
pkgver=20221212
pkgrel=1    
pkgdesc="Open-source, cross-platform level editor for id Tech based games."
url="https://github.com/Garux/netradiant-custom"
depends=('qt5-base' 'glib2' 'libxml2' 'zlib' 'libpng')
makedepends=('wget' 'svn' 'gcc' 'make')
source=("https://github.com/Garux/netradiant-custom/archive/refs/tags/${pkgver}.tar.gz")
                                   
sha256sums=('ef99477bf822de726197bec6366a8d3d0de2640d9d76faa97ddf31300971bfea')
license=('custom')
arch=('any')  
build () {
    cd "$srcdir/$pkgname-$pkgver"
    echo $PWD
    make
}   

I do not undurstant, what should i do ?

@Garux
Copy link
Owner

Garux commented Nov 6, 2023

Apparently your build system adds some params either directly or to CFLAGS/CXXFLAGS/CPPFLAGS vars. Or latter are modified in some other way.
Idk if they may stop compilation, but some are outta place definitely, e.g. enabling exceptions, while project clearly disables them.
Supposedly working build way is https://github.com/Garux/netradiant-custom/blob/master/COMPILING#L21

@eGax
Copy link

eGax commented Nov 19, 2023

Here is my build script works great on Arch/Manjaro.

git clone --recursive https://github.com/Garux/netradiant-custom.git
cd netradiant-custom
make
cd install
./radiant.x86_64

image

I never tried your PKGbuild script. I will give it a go now.

I get different errors though. Here is the tail end of my compile using your pkgbuild script:

g++ tools/quake3/common/cmdlib.cpp -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -MMD -W -Wall -Wcast-align -Wcast-qual -Wno-unused-parameter -fno-strict-aliasing -fPIC -std=c++17 -Wreorder -fno-exceptions -fno-rtti -I/usr/include/libxml2  -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-6 -pthread  -I/usr/include/libpng16   -Itools/quake3/common -Ilibs -Iinclude -Ilibs/assimp/include -DNDEBUG -DPOSIX -DXWINDOWS -DRADIANT_VERSION="\"1.5.0n-git-78f8977\"" -DRADIANT_MAJOR_VERSION="\"5\"" -DRADIANT_MINOR_VERSION="\"0\"" -DRADIANT_ABOUTMSG="\"Custom build\"" -DQ3MAP_VERSION="\"2.5.17n-git-78f8977\"" -DRADIANT_EXECUTABLE="\"x86_64\""  -c -o tools/quake3/common/cmdlib.o
g++ tools/quake3/common/qimagelib.cpp -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -MMD -W -Wall -Wcast-align -Wcast-qual -Wno-unused-parameter -fno-strict-aliasing -fPIC -std=c++17 -Wreorder -fno-exceptions -fno-rtti -I/usr/include/libxml2  -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-6 -pthread  -I/usr/include/libpng16   -Itools/quake3/common -Ilibs -Iinclude -Ilibs/assimp/include -DNDEBUG -DPOSIX -DXWINDOWS -DRADIANT_VERSION="\"1.5.0n-git-78f8977\"" -DRADIANT_MAJOR_VERSION="\"5\"" -DRADIANT_MINOR_VERSION="\"0\"" -DRADIANT_ABOUTMSG="\"Custom build\"" -DQ3MAP_VERSION="\"2.5.17n-git-78f8977\"" -DRADIANT_EXECUTABLE="\"x86_64\""  -c -o tools/quake3/common/qimagelib.o
In file included from tools/quake3/common/qimagelib.cpp:28:
tools/quake3/common/vfs.h:41:6: error: ‘vector’ in namespace ‘std’ does not name a template type
   41 | std::vector<CopiedString> vfsListShaderFiles( const char *shaderPath );
      |      ^~~~~~
tools/quake3/common/vfs.h:1:1: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
  +++ |+#include <vector>
    1 | /*
tools/quake3/common/vfs.h:45:13: error: ‘vector’ in namespace ‘std’ does not name a template type
   45 | extern std::vector<CopiedString> g_strForbiddenDirs;
      |             ^~~~~~
tools/quake3/common/vfs.h:45:8: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
   45 | extern std::vector<CopiedString> g_strForbiddenDirs;
      |        ^~~
make: *** [Makefile:507: tools/quake3/common/qimagelib.o] Error 1
make: *** Waiting for unfinished jobs....
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: netradiant-custom-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
netradiant-custom - exit status 4

@Garux
Copy link
Owner

Garux commented Nov 20, 2023

Equal type of error tho, complains about STL inclusion, while it's clearly included: https://github.com/Garux/netradiant-custom/blob/master/tools/quake3/common/vfs.h#L33

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