Jump to content
  • 0
cxx

Failing to compile plugins

Question

Hey everyone,

 

Some background:

 

Debian 8. Fresh install, self managed dedi. Proceeded to install LAMP. RO Server works properly, website works properly.

 

Decided to add plugins, went to compile. make clean && make sql work fine. make plugins, on the other hand, throws an error. See attached screenshots: 

 

Just to clarify - it has nothing to do with AFK. It's simply whichever plugin is first in my makefile.in.

 

 MAKE    plugins
make[1]: Entering directory '/home/hercuser/Hercules/src/plugins'
        CC      sample.c
        PLUGIN  sample
        CC      db2sql.c
        PLUGIN  db2sql
        CC      HPMHooking.c (CHAR)
        PLUGIN  HPMHooking_char
        CC      HPMHooking.c (LOGIN)
        PLUGIN  HPMHooking_login
        CC      HPMHooking.c (MAP)
        PLUGIN  HPMHooking_map
make[1]: *** No rule to make target 'afk', needed by 'all'.  Stop.
make[1]: Leaving directory '/home/hercuser/Hercules/src/plugins'
Makefile:132: recipe for target 'plugins' failed
make: *** [plugins] Error 2

 

Make clean:

1xyvJXl.png

 

 

Make SQL:

wL9He1D.png

 

 

Make plugins:

 

jJmAQy9.png

 

 

Makefile.in:

 

# This file is part of Hercules.
# http://herc.ws - http://github.com/HerculesWS/Hercules
#
# Copyright © 2013-2015  Hercules Dev Team
#
# Hercules is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

# @configure_input@

################  PLUGIN CONFIGURATION  ##############################
#                                                                    #
# When you add a plugin, add its name here:                          #
# Example: if you have a plugin named my_cool_plugin.c and another   #
# one named my_second_plugin.c, add them to the list like this:      #
#                                                                    #
# MYPLUGINS = my_cool_plugin my_second_plugin                        #
#                                                                    #
# This is only needed if you want to build your plugin through       #
#   'make plugins' or 'make all'. If you don't add it to this list,  #
#   you will still be able to build your plugin through              #
#   'make plugin.my_plugin'                                          #
#                                                                    #
# Note: DO NOT include the .c extension!!!                           #

MYPLUGINS = afk auraset autoattack costumeitem Critical-Magic ExtendedVending market mapmoblist restock storeit storeequip whosell

#                                                                    #
#########  DO NOT EDIT ANYTHING BELOW THIS LINE!!!  ##################

# All plugins in the src/plugins directory
HPMHOOKING = $(addprefix HPMHooking_, login char map)
ALLPLUGINS = $(filter-out HPMHooking, $(basename $(wildcard *.c))) $(HPMHOOKING)

# Plugins that will be built through 'make plugins' or 'make all'
PLUGINS = sample db2sql HPMHooking_char HPMHooking_login HPMHooking_map $(MYPLUGINS)

COMMON_D = ../common
COMMON_H = $(wildcard $(COMMON_D)/*.h)
COMMON_INCLUDE = -I..

THIRDPARTY_INCLUDE = -I../../3rdparty

CONFIG_D = ../config
CONFIG_H = $(wildcard $(CONFIG_D)/*.h) $(wildcard $(CONFIG_D)/*/*.h)

MAP_H = $(wildcard ../map/*.h)
CHAR_H = $(wildcard ../char/*.h)
LOGIN_H = $(wildcard ../login/*.h)
ALL_H = $(COMMON_H) $(CONFIG_H) $(MAP_H) $(CHAR_H) $(LOGIN_H)

@SET_MAKE@

CC = @CC@
export CC

#####################################################################
.PHONY: all $(ALLPLUGINS) HPMHooking clean buildclean help

all: $(PLUGINS) Makefile

$(ALLPLUGINS): %: ../../plugins/%@DLLEXT@
	@echo "	PLUGIN	$@"

HPMHooking: $(HPMHOOKING)

buildclean:
	@echo "	CLEAN	plugins (build temp files)"
	@rm -rf *.o

clean: buildclean
	@echo "	CLEAN	plugins"
	@rm -rf ../../plugins/*@DLLEXT@

help:
	@echo "possible targets are $(PLUGINS:%='%') 'all' 'clean' 'help'"
	@echo ""
	@echo "$(PLUGINS:%='%')"
	@echo "              - builds a specific plugin"
	@echo "'all'         - builds all above targets"
	@echo "'clean'       - cleans builds and objects"
	@echo "'buildclean'  - cleans build temporary (object) files, without deleting the"
	@echo "                compiled plugins"
	@echo "'help'        - outputs this message"

#####################################################################

Makefile: Makefile.in
	@$(MAKE) -C ../.. src/plugins/Makefile

.SECONDEXPANSION:

../../plugins/%@DLLEXT@: %.c $(ALL_H) $$(shell ls %/* 2>/dev/null)
	@echo "	CC	$<"
	@$(CC) $(COMMON_INCLUDE) $(THIRDPARTY_INCLUDE) @PLUGINSTATIC@ @DEFS@ @CFLAGS@ @PCRE_CFLAGS@ @CPPFLAGS@ @LDFLAGS@ @SOFLAGS@ -o $@ $<

../../plugins/HPMHooking_login@DLLEXT@: HPMHOOKINGTYPE = LOGIN
../../plugins/HPMHooking_char@DLLEXT@: HPMHOOKINGTYPE = CHAR
../../plugins/HPMHooking_map@DLLEXT@: HPMHOOKINGTYPE = MAP

../../plugins/HPMHooking_%@DLLEXT@: HPMHooking.c $(ALL_H) $$(shell ls HPMHooking/*_%* HPMHooking/*_common* 2>/dev/null)
	@echo "	CC	$< ($(HPMHOOKINGTYPE))"
	@$(CC) -DHPMHOOKING_$(HPMHOOKINGTYPE) $(COMMON_INCLUDE) $(THIRDPARTY_INCLUDE) @PLUGINSTATIC@ @DEFS@ @CFLAGS@ @PCRE_CFLAGS@ @CPPFLAGS@ @LDFLAGS@ @SOFLAGS@ -o $@ $<
 

 

 

Plugins.conf:

 

//====================================================
//=       _   _                     _
//=      | | | |                   | |
//=      | |_| | ___ _ __ ___ _   _| | ___  ___
//=      |  _  |/ _ \ '__/ __| | | | |/ _ \/ __|
//=      | | | |  __/ | | (__| |_| | |  __/\__ \
//=      \_| |_/\___|_|  \___|\__,_|_|\___||___/
//=
//=            http://herc.ws/board/
//====================================================
//== Topic Discussion ================================
//== http://herc.ws/board/topic/549-introducing-hercules-plugin-manager/
//====================================================
//== Description =====================================
//The plugin system allows you to create customized scripts
//outside of the source. These scripts won't conflict with any
//future source updates - think of it as a /conf/import/ for the source.
//====================================================

/* --------------- Format ---------------
After you have listed your  plugin(s) in "quotations",
you need to put in a comma, to separate the plugins.
-----------------------------------------
plugins_list: [
	"example",
	"other",
]
-----------------------------------------
Please note that your scripts need to be saved
in the .c (source code) extension and placed in the /src/plugin/ folder.
-----------------------------------------
*/
plugins_list: [
	/* Enable HPMHooking when plugins in use rely on Hooking */
	"HPMHooking",
	//"db2sql",
	"@arealoot",
	"afk",
	"auraset",
	"autoattack",
	"costumeitem",
	"Critical-Magic",
	"ExtendedVending",
	"market",
	"mapmoblist",
	"restock",
	"storeit",
	"storeequip",
	"whosell",
]

 

 

 

Just to confirm, here is me checking that I have all of the required packages installed on my dedi: 

 

apt-get install git make gcc mysql-server libmysqlclient-dev zlib1g-dev libpcre3-dev screen

returns:

 

rdPOX7N.png

 

Thanks in advance.

Edited by cxx

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.