Cannot compile/install gnu program

Hello,

I'm trying to install ansifilter which is a program that translates ansi text to HTML.
The idea is to install it on AIX 7.1 but is failing. All de appropriate gcc libraries and requirements for this software were installed successfully, but when I do the gmake I get the following error:

--------------------------------------------------------------------------
g++ arg_parser.o stringtools.o cmdlineoptions.o main.o platform_fs.o codegenerator.o htmlgenerator.o texgenerator.o latexgenerator.o rtfgenerator.o plaintextgenerator.o bbcodegenerator.o elementstyle.o stylecolour.o preformatter.o -o ansifilter
collect2: fatal error: crtcxa.o: cannot open as COFF file
compilation terminated.
gmake: *** [ansifilter] Error 1
--------------------------------------------------------------------------

Below is the content of the makefile:

####################################################
# Simple Makefile for ANSIFilter
# This file will compile the ansifilter binary.
# See INSTALL for instructions.

CC=g++

CFLAGS= -c -Wall -O2

LDFLAGS=

SOURCES=arg_parser.o stringtools.o cmdlineoptions.o main.o platform_fs.o\
codegenerator.o htmlgenerator.o texgenerator.o latexgenerator.o rtfgenerator.o\
plaintextgenerator.o bbcodegenerator.o elementstyle.o stylecolour.o preformatter.o

OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=ansifilter

all: $(SOURCES) $(EXECUTABLE)

$(EXECUTABLE): $(OBJECTS)
$(CC) $(LDFLAGS) $(OBJECTS) -o $@

.cpp.o:
$(CC) $(CFLAGS) $< -o $@

clean:
@rm -f .o
@rm -f ./ansifilter
@rm -f ./ansifilter_gui
@rm -f ./.deps/

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

Any ideas?
Does this error means that AIX is lacking of something to open this COFF/XCOFF file?

Also please note that crtcxa.o does not exist on the source package of this program so I'm not sure from where it is coming from.

Thanks!

Here is some information from Host/Target specific installation notes for GCC - GNU Project - Free Software Foundation (FSF)

"AIX 4.3 utilizes a �large format� archive to support both 32-bit and 64-bit object modules. The routines provided in AIX 4.3.0 and AIX 4.3.1 to parse archive libraries did not handle the new format correctly. These routines are used by GCC and result in error messages during linking such as �not a COFF file�. The version of the routines shipped with AIX 4.3.1 should work for a 32-bit environment. The -g option of the archive command may be used to create archives of 32-bit objects using the original �small format�. A correct version of the routines is shipped with AIX 4.3.2 and above. "

Hey dude,

Thanks for the quick response.

I just checked the link you posted but from what I read if refers to AIX 4.3 and I'm compiling/linking this on AIX 7.1 so the issue should be already resolved on this OS version.

Still, I tried with "-g" flag and is dropping the same error :frowning:

Any other suggestion?

Thanks!

It's failing on the link step. Are you using GNU ld?
post the output if these commands

ld -version
which ld
gcc -v

the program "collect2" is giving the error. Where did this program come from? Maybe the problem is a packaging error of "build2".

And it is saying it cannot open it AS COFF. I read this to mean the file is not in the expected COFF format.

It nearly feels like a RPM packaging that is not checking for ostype and the non-AIX binaries/libraries are installed.

How sure are you that everything you have installed is AIX 7.1 ready?