Git Product home page Git Product logo

Comments (21)

ObaniGemini avatar ObaniGemini commented on August 19, 2024

I erased build files and the original makefile to use cmake.

I changed cmake_minimum_required from VERSION 3.5 to VERSION 3.0.2 (my version)
in ./CMakeLists.txt and ./src/tools/CMakeLists.txt

I also commented Windows and Apple related parts as they weren't used, and parts not concerning me (mumble to OFF, option(USE_RENDERER_DLOPEN "" ON)) to avoid any kind of problems.

For now everything builds fine.

from tremulous.

wtfbbqhax avatar wtfbbqhax commented on August 19, 2024

@ObaniGemini

The issue is the default C standard for your compiler is either c89/gnu89. This can be resolved by creating a Makefile.local in the same directory as the Makefile containing

CFLAGS=-std=gnu99

Minimum C++ standard is C++14


EDIT : I would like to use clang as a build system cause GCC is outdated on Debian 8. Why do you force the use of GCC ?

We don't, you can choose a different compiler by configuring it in the Makefile.local.

Here is mine:

CC=$(LLVM)/bin/clang
CXX=$(LLVM)/bin/clang++

where LLVM is the path to my newer clang which I downloaded from clang.llvm.org

Also, why don't you use CMake that would make things easier (to me at least), for errors, dependencies, and choice of the build system ?

We do offer CMake build system.

I don't understand what you are saying. Every single thing you're pointing out, we have.

from tremulous.

ObaniGemini avatar ObaniGemini commented on August 19, 2024

I ended up failing compilation on src/client/snd_mem with many error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
Trying again tweaking some things

EDIT : looking up at what you targetted

from tremulous.

ObaniGemini avatar ObaniGemini commented on August 19, 2024

I don't understand what you are saying. Every single thing you're pointing out, we have.

And I don't get why wouldn't you get that without a documentation, none can do nothing, at least quickly. Documentation here says "do make"

from tremulous.

wtfbbqhax avatar wtfbbqhax commented on August 19, 2024

Fair enough

from tremulous.

ObaniGemini avatar ObaniGemini commented on August 19, 2024

Changing CFLAGS doesn't do anything to me. I just still get the message use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
But changing the flags to those indicated just makes me get even more errors.

I never worked with C++ and am a newbie to code too so I don't get how this is supposed to work. Also, any way I could use llvm as a CFLAG ?

from tremulous.

wtfbbqhax avatar wtfbbqhax commented on August 19, 2024

Delete the build directory first, the CFLAGS should fix the problem after that.

from tremulous.

ObaniGemini avatar ObaniGemini commented on August 19, 2024

I do that each time I redo cmake.

P.S : who are you on GH's forum ?

from tremulous.

wtfbbqhax avatar wtfbbqhax commented on August 19, 2024

@ObaniGemini I've just pushed another branch fix_old_gcc, please give it a try.

I'm blowFish

from tremulous.

ObaniGemini avatar ObaniGemini commented on August 19, 2024

using simple make, I get lots of

dereferencing pointer to incomplete type search
dereferencing pointer to incomplete type hintsp
dereferencing pointer to incomplete type hints
dereferencing pointer to incomplete type

Lots of warning, and lots of undeclared variables apparently.
http://pastebin.com/UUDPy3xJ

Also, I never was abled to compile your clients too, neither any tremulous source in my memory. Maybe the problem is more general than it could seem on my side
Sending you a message on the forum.

from tremulous.

ObaniGemini avatar ObaniGemini commented on August 19, 2024

Using your branch and after installing lua, liblua, liblua-dev, libtolua++, libtolua++-dev, lua-curl, lua-curl-dev :

Many warnings and 2 errors :

/src/qcommon/net_ip.c:360:58: error: ‘NI_NUMERICHOST’ undeclared (first use in this function) if(getnameinfo(input, inputlen, dest, destlen, NULL, 0, NI_NUMERICHOST) && destlen > 0)

/src/qcommon/net_ip.c:1321:25: error: ‘IFF_UP’ undeclared (first use in this function) if(ifap->ifa_flags & IFF_UP) ^

Also, is it needed to have cmake_minimum_required(3.5) ?
I set it to 3.0.2 which is the more recent version I got.

from tremulous.

cengique avatar cengique commented on August 19, 2024

@ObaniGemini 3.5 > 3.0.2, so could be the reason for the errors. I'm able to compile it on my Gentoo Linux box.

Those symbols also exist in the original Tremulous code. They are coming from basic system includes for TCP/IP networking: http://lxr.free-electrons.com/ident?i=IFF_UP

from tremulous.

ObaniGemini avatar ObaniGemini commented on August 19, 2024

Could isn't is. We won't go further without clear answers. I already stated that earlier but no one answered

from tremulous.

cengique avatar cengique commented on August 19, 2024

@ObaniGemini Let's see if @wtfbbqhax /blowfish has something to say more. I have a debian system on the side, let me know if you are stuck and I can try compiling there.

from tremulous.

cengique avatar cengique commented on August 19, 2024

Ok, I'm getting weird errors trying to compile the fix_old_gcc branch on Debian with the above-suggested Makefile.local:

DED_CC src/qcommon/net_ip.c
src/qcommon/net_ip.c: In function ‘SearchAddrInfo’:
src/qcommon/net_ip.c:268:11: error: dereferencing pointer to incomplete type
   if(hints->ai_family == family)
           ^
src/qcommon/net_ip.c:271:16: error: dereferencing pointer to incomplete type
   hints = hints->ai_next;

kernel 3.16.0-4-amd64
gcc 4.9.2
make 4.0
no cmake

from tremulous.

ObaniGemini avatar ObaniGemini commented on August 19, 2024

@cengique : are you on testing or stable ? I'm on stable and I know outdated packages are often an issue there.
P.S : You might want to use cmake, I avoided using the Makefile as it never worked for me on tremulous :/

P.P.S : can "-j" option in make have an impact on compilation ? (make -j4)
Thought it shouldn't, I still wonder, in case... ^^

from tremulous.

cengique avatar cengique commented on August 19, 2024

@ObaniGemini My Debian is an abomination because it's mixed between stable/testing/unstable. You can customize your /etc/apt/sources.list so that you can pick and choose more recent versions of programs. If you want a more bleeding edge Linux, Arch, Manjaro, or Gentoo are better.

oh I didn't realize @wtfbbqhax got the Cmake to work for the client/server executables. So I installed cmake 3.7.2 and now I am getting the above net_ip.c error I got earlier with just make and also the IFF_UP error @ObaniGemini reported earlier.

I am using the -j option to make should not make a difference in this case because header files seem to be missing. I have it available in that machine at /usr/include/net/if.h.

@wtfbbqhax are we missing a networking header in the Cmake file?

from tremulous.

wtfbbqhax avatar wtfbbqhax commented on August 19, 2024

The missing network header stuff doesn't make any sense. I've seen this reported by Code_Man before- his case magically resolved itself so I can only presume it's due to a continued make in an already failed/tainted build directory.

@cengique I've created a PR#6 which fixes the C standard which was originally reported, if you could be so kind as to review that.

from tremulous.

wtfbbqhax avatar wtfbbqhax commented on August 19, 2024

Ok, nevermind i was able to reproduce the other issue. I'll fix it this evening.

from tremulous.

wtfbbqhax avatar wtfbbqhax commented on August 19, 2024

@ObaniGemini This is fixed in the latest master commit

from tremulous.

ObaniGemini avatar ObaniGemini commented on August 19, 2024

compiled successfully with the Makefile :)

from tremulous.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.