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

on ubuntu compile windows 64bit error #1110

Open
wawava opened this issue Apr 13, 2017 · 0 comments
Open

on ubuntu compile windows 64bit error #1110

wawava opened this issue Apr 13, 2017 · 0 comments

Comments

@wawava
Copy link

wawava commented Apr 13, 2017

Dear all
i try compile windows 64bit on Ubuntu 16.10, and i install depend

sudo apt-get install build-essential -y
sudo apt-get install nsis nsis-common -y
sudo apt-get install mingw-w64 mingw-w64-common mingw-w64-x86-64-dev -y

i find mingw use x86_64-w64-mingw32-gcc replace amd64-mingw32msvc-gcc,so i mod Makefile

ifneq (,$(shell which amd64-mingw32msvc-gcc))
	MING_BASE:=amd64-mingw32msvc-

to

ifneq (,$(shell which x86_64-w64-mingw32-gcc))
	MING_BASE:=x86_64-w64-mingw32-
else

then make TARGET=winagent , i get some error

x86_64-w64-mingw32-gcc -shared -o lua52.dll lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o lauxlib.o lbaselib.o lbitlib.o lcorolib.o ldblib.o liolib.o lmathlib.o loslib.o lstrlib.o ltablib.o loadlib.o linit.o
strip --strip-unneeded lua52.dll
x86_64-w64-mingw32-gcc -o ossec-lua.exe -s lua.o lua52.dll -lm
make[2]: Leaving directory '/tmp/ossec-hids-master/src/external/lua-5.2.3/src'
make -f Makefile.mingw "LUAC_T=ossec-luac.exe" ossec-luac.exe
make[2]: Entering directory '/tmp/ossec-hids-master/src/external/lua-5.2.3/src'
x86_64-w64-mingw32-gcc -O2 -Wall -DLUA_COMPAT_ALL -c -o luac.o luac.c
i686-w64-mingw32-ar rcu liblua.a lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o lauxlib.o lbaselib.o lbitlib.o lcorolib.o ldblib.o liolib.o lmathlib.o loslib.o lstrlib.o ltablib.o loadlib.o linit.o
i686-w64-mingw32-ar: u' modifier ignored since D' is the default (see `U')
i686-w64-mingw32-ranlib liblua.a
x86_64-w64-mingw32-gcc -o ossec-luac.exe luac.o liblua.a -lm
liblua.a: error adding symbols: Archive has no index; run ranlib to add one
collect2: error: ld returned 1 exit status
Makefile.mingw:66: recipe for target 'ossec-luac.exe' failed
make[2]: *** [ossec-luac.exe] Error 1
make[2]: Leaving directory '/tmp/ossec-hids-master/src/external/lua-5.2.3/src'
Makefile.mingw:112: recipe for target 'mingw' failed
make[1]: *** [mingw] Error 2
make[1]: Leaving directory '/tmp/ossec-hids-master/src/external/lua-5.2.3/src'
Makefile:609: recipe for target 'winagent' failed
make: *** [winagent] Error 2

i try to fix the problem, then i mod lua-5.2.3/src/Makefile.mingw

CC= i686-w64-mingw32-gcc
CFLAGS= -O2 -Wall -DLUA_COMPAT_ALL $(SYSCFLAGS) $(MYCFLAGS)
LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
LIBS= -lm $(SYSLIBS) $(MYLIBS)

AR= i686-w64-mingw32-ar rcu
RANLIB= i686-w64-mingw32-ranlib
RM= rm -f

try replace all i686-w64-mingw32 to x86_64-w64-mingw32,then complie success
but install on windows 64bit system,ossec agent can't start,have some error, help me fix it,thanks

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