antiblock
Cyphriun
  • Chatbox

    Did you check out our Discord? https://discord.gg/FFdvMjk9xA
    You don't have permission to chat.
    Load More
  • 0
TeddyChulo

[COMPILE ERROR] gmake: g++49: Command not found

Question

Boa tarde,

 

Ao tentar compilar as source files do AddictMt2 estou a obter o seguinte erro:  gmake: g++49: Command not found

 

Os comandos que estou a executar são os seguintes:

  • cd /usr/src/addictmt2_zeus/Server/game/src
  • gmake clean
  • gmake -j20 (qual a razão para usar o -j20? - foi o que encontrei quase sempre como comando em tutoriais)

 

Ficheiro gmake:

 

Citar

PLATFORM = $(shell file /bin/ls | cut -d' ' -f3 | cut -d'-' -f1)

# GCC_VERSION = $(shell $(CC) --version 2>&1 | grep "(GCC)" | cut -d' ' -f3  | cut -d'.' -f1)
# BSD_VERSION = $(shell uname -v 2>&1 | cut -d' ' -f2 | cut -d'.' -f1)

P4_VERSION = $(shell cat version.rafa)

CC = g++49

INCDIR =
LIBDIR =
BINDIR = ..
OBJDIR = OBJDIR
$(shell if [ ! -d $(OBJDIR) ]; then mkdir $(OBJDIR); fi)

# Standard Setting
LIBS = -pthread -lm -lmd
# Removed -fno-rtti 
CFLAGS = -g -Wall -O2 -m32 -pipe -fexceptions -D_THREAD_SAFE -DNDEBUG # -D_USE_SERVER_KEY_

# ifeq ($(GCC_VERSION), 4)
CFLAGS += -mtune=i686 -fstack-protector-all
# else
# CFLAGS += -mcpu=i686
# endif

# Mais flags
CFLAGS += -Wno-strict-aliasing -Wno-delete-non-virtual-dtor -Wno-unused-local-typedefs -Wno-conversion-null -std=c++11

# boost
INCDIR += -I../../../Extern/include/boost

# DevIL
INCDIR += -I../../libdevil
LIBDIR += -L../../libdevil
LIBS += -lIL -lpng -ltiff -lmng -llcms -ljpeg

# MySQL
#ifeq ($(BSD_VERSION), 7)
INCDIR += -I../../libmysql/7.x-5.1.35
LIBDIR += -L../../libmysql/7.x-5.1.35
#else
#INCDIR += -I../../libmysql/5.x-5.1.35
#LIBDIR += -L../../libmysql/5.x-5.1.35
#endif

LIBS += -lmysqlclient -L/usr/local/lib/mysql -lz

# Miscellaneous external libraries
INCDIR += -I../../../Extern/include
LIBDIR += -L../../../Extern/lib/c++11
LIBDIR += -L../../../Extern/lib/cryptopp
LIBS += -lcryptopp

# HackShield
INCDIR += -I../../libhackshield/include
LIBDIR += -L../../libhackshield/lib
LIBS += -lanticpxsvr

# XTrap
INCDIR += -I../../libxtrap/include

# openssl
#INCDIR += -I/usr/include
#LIBS += -lssl
#LIBS += /usr/lib/libssl.a

# Project Library
INCDIR += -I../../liblua/include
INCDIR += -I/usr/local/include
INCDIR += -L/usr/local/lib/mysql
INCDIR += -I../../libserverkey
LIBDIR += -L../../libthecore/lib -L../../libpoly -L../../libsql -L../../libgame/lib -L../../liblua/lib -L../../libserverkey
LIBDIR += -L/usr/local/lib
LIBS += -lthecore -lpoly -llua -llualib -lsql -lgame -lserverkey
USE_STACKTRACE = 0
ifeq ($(USE_STACKTRACE), 1)
LIBS += /usr/local/lib/libexecinfo.a
endif

TARGET  = $(BINDIR)/game_r$(P4_VERSION)_$(PLATFORM)

CFILE    = minilzo.c

# Listar todos os *.cpp na pasta, menos o main.cpp
CPPFILE    = $(shell ls *.cpp | grep -v "^main.cpp" | tr '\n' ' ')

COBJS    = $(CFILE:%.c=$(OBJDIR)/%.o)
CPPOBJS    = $(CPPFILE:%.cpp=$(OBJDIR)/%.o)

MAINOBJ = $(OBJDIR)/main.o
MAINCPP = main.cpp

# TESTOBJ = $(OBJDIR)/test.o
# TESTCPP = test.cpp
# TEST_TARGET = $(BINDIR)/test

default: $(TARGET)

$(OBJDIR)/minilzo.o: minilzo.c
    @$(CC) $(CFLAGS) $(INCDIR) -c $< -o $@
    @echo compile $<

$(OBJDIR)/version.o: version.cpp
    @$(CC) $(CFLAGS) -D__USER__=\"$(USER)\" -D__HOSTNAME__=\"$(HOSTNAME)\" -D__PWD__=\"$(PWD)\" -D__P4_VERSION__=\"$(P4_VERSION)\" -c $< -o $@
    @echo compile $<

$(OBJDIR)/%.o: %.cpp
    @echo compile $<
    @$(CC) $(CFLAGS) $(INCDIR) -c $< -o $@

# limit_time:
# @echo update limit time
# @python update_limit_time.py

$(TARGET): $(CPPOBJS) $(COBJS) $(MAINOBJ)
    @echo linking $(TARGET)...
    @$(CC) $(CFLAGS) $(LIBDIR) $(COBJS) $(CPPOBJS) $(MAINOBJ) $(LIBS) -o $(TARGET)
    @echo stripping $(TARGET)...
    @strip --strip-all $(TARGET)

# $(TEST_TARGET): $(TESTCPP) $(CPPOBJS) $(COBJS) $(TESTOBJ)
# @echo linking $(TEST_TARGET)
# @$(CC) $(CFLAGS) $(LIBDIR) $(COBJS) $(CPPOBJS) $(TESTOBJ) $(LIBS) -o ../test

clean:
    @rm -f $(COBJS) $(CPPOBJS) $(BINDIR)/game_r* $(BINDIR)/conv Depend*

tag:
    ctags *.cpp *.h *.c
    
addversion:
    @echo A acrescentar nova build...
    @./version.sh

dep:
    makedepend -f Depend $(INCDIR) -I/usr/include/c++/3.3 -I/usr/include/c++/4.2 -p$(OBJDIR)/ $(CPPFILE) $(CFILE) $(MAINCPP) 2> /dev/null > Depend

sinclude Depend
 

 

Agradeço resposta e caso precisem de informação mais detalhada por favor digam.

 

Cumprimentos

Share this post


Link to post
Share on other sites

5 answers to this question

  • 0

Se não tiveres instalado a versão 49 do gcc então:

 

pkg install gcc49 *

Edited by Keselth (see edit history)

Share this post


Link to post
Share on other sites
antiblock
Rodnia | Alpha & Omega
  • 0
11 horas atrás, Keselth disse:

Se não tiveres instalado a versão 49 do gcc então:

 

pkg install gcc49 *

 

Keselth obrigado pela dica. Tenho a versão gcc 1.1, quando tento instalar gcc49 dá o seguinte erro (mesmo após desinstalar versão 1.1):

 

Citar

The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg from http://pkg.freebsd.org/freebsd:10:x86:64/latest, please wait...
pkg: Error fetching http://pkg.freebsd.org/freebsd:10:x86:64/latest/Latest/pkg.txz: No address record
A pre-built version of pkg could not be found for your system.
Consider changing PACKAGESITE or installing it from ports: 'ports-mgmt/pkg'.

 

PS: Não deverá ser problema de DNS porque consigo pingar exteriores. Poderá ser do URL ?

Versão da máquina: 10.3-RELEASE-amd64

Share this post


Link to post
Share on other sites
  • 0
15 horas atrás, TeddyChulo disse:

 

Keselth obrigado pela dica. Tenho a versão gcc 1.1, quando tento instalar gcc49 dá o seguinte erro (mesmo após desinstalar versão 1.1):

 

 

PS: Não deverá ser problema de DNS porque consigo pingar exteriores. Poderá ser do URL ?

Versão da máquina: 10.3-RELEASE-amd64

# cd /usr/ports/ports-mgmt/pkg

# make

# make install clean

 

Depois faz o que o keselth disse

Share this post


Link to post
Share on other sites
  • 0
Em 14/07/2017 em 15:40, .тιαgσ disse:

# cd /usr/ports/ports-mgmt/pkg

# make

# make install clean

 

Depois faz o que o keselth disse

tar.xz: No address record
=> Attempting to fetch http://mirror.shatow.net/freebsd/pkg/pkg-1.10.5.tar.xz
fetch: http://mirror.shatow.net/freebsd/pkg/pkg-1.10.5.tar.xz: No address record
=> Attempting to fetch http://distcache.FreeBSD.org/ports-distfiles/pkg-1.10.5.tar.xz
fetch: http://distcache.FreeBSD.org/ports-distfiles/pkg-1.10.5.tar.xz: No address record
=> Couldn't fetch it - please try to retrieve this
=> port manually into /usr/ports/distfiles/ and try again.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/ports-mgmt/pkg
*** Error code 1

Stop.
make: stopped in /usr/ports/ports-mgmt/pkg
 

E aqui fazes o quê? :|

Share this post


Link to post
Share on other sites
  • 0

freebsd versão 10- perdeu suporte a instalação de pkg resumindo não consegues mais instalar e na versão

a cima a 10 foi removido gcc49 em pkg

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now