Tag Archives: CFLAGS

Cannot compile/install gnu program

By bazajav

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!

Source: FULL ARTICLE at The UNIX and Linux Forums

Cannot compile/install gnu program on AIX

By bazajav

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!

Source: FULL ARTICLE at The UNIX and Linux Forums

Solaris 10 apache 64 bit libldap.so problem

By teotao

Hello,

I am fairly new to Solaris so please be gentle ;). I am trying to install apache 2.4.3 adapting a script one of my colleagues wrote for version 2.2.23. The problem lies in the fact that I am aiming at creating a 64bit package hence I’ve already amended the script to reflect that. I understand this is the way to go about it, right? However, I get an error every single time I run the script.

Code:

ld: fatal: file /usr/local/lib/libldap.so: wrong ELF class: ELFCLASS32
ld: fatal: File processing errors. No output written to ldap/.libs/apr_ldap-1.so
collect2: ld returned 1 exit status
gmake[3]: *** [ldap/apr_ldap.la] Error 1
gmake[3]: Leaving directory `/apps/pkg/src/httpd-2.4.3/srclib/apr-util'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/apps/pkg/src/httpd-2.4.3/srclib/apr-util'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/apps/pkg/src/httpd-2.4.3/srclib'
gmake: *** [all-recursive] Error 1


I understand that the file libldap.so is a 32bit file, but am clueless what to do next.

Here are my exports:

Code:

export LDFLAGS="-L/usr/sfw/lib/amd64"
export CPPFLAGS="-m64"
export LD_LIBRARY_PATH=/usr/lib:/usr/sfw/lib
export LD_LIBRARY_PATH_64=/usr/lib/64:/usr/sfw/lib/64
export CXXFLAGS="-m64 -fPIC"
export PATH=/usr/sfw/bin/:/usr/ccs/bin/sparcv9:/usr/sbin:/usr/bin:/usr/sfw/sbin:/usr/ccs/bin
export CXX="/usr/sfw/bin/gcc -m64"
export CFLAGS="-m64"
export CPP_FLAGS="-m64"
export PKG_CONFIG_PATH=/usr/lib/64/pkgconfig
export CC="gcc -m64"


Could anyone point me in the right direction, please?

…read more
Source: FULL ARTICLE at The UNIX and Linux Forums

Bison -pap_expr_yy invalid character:% unexpected "identifier" while running make for Apache2.4.3 64

By Ashish Gupta

The Follwing packages are installed on my AIX 6.1 box
gcc-4.7.2-1
gcc-c++-4.7.2-1
gcc-cpp-4.7.2-1
gcc-gfortran-4.7.2-1
libgcc-4.7.2-1
libgomp-4.7.2-1
libstdc++-4.7.2-1
libstdc++-devel-4.7.2-1
gmp-5.0.5-1
libmpc-1.0.1-2
libmpc-devel-1.0.1-2
libmpcdec-1.2.6-1
libmpcdec-devel-1.2.6-1
mpfr-3.1.1-1
mpfr-devel-3.1.1-1
flex-2.5.4a-6
m4-1.4.1-1
bison-1.875-3
libiconv-1.14-2
gettext-0.17-1
gettext-devel-0.17-1
I used follwing command to confiure the apache:
./configure CC=”gcc -maix64″ CFLAGS=”-maix64″ CXX=”gcc -maix64″ CPPFLAGS=”-maix64″ NM=”nm -X64″ AR=”ar -X64″ LDFLAGS=”-L/usr/ccs/bin/ld” –prefix=/usr/local/share/bld/apache2 –enable-ssl=shared –with-ssl=/usr/local/share/bld/ssl –enable-deflate=shared –with-z=/usr/local/share/bld/zlib –enable-mods-shared=all –with-expat=builtin –with-pcre=/usr/local/share/bld/pcre –with-included-apr –enable-v4-mapped

The above command executed successfully. While executing the make command follwing error is reported:
bison -pap_expr_yy –defines=/usr/local/share/bld/httpd-2.4.3/server/util_expr_parse.h -o /usr/local/share/bld/httpd-2.4.3/server/util_expr_parse.c /usr/local/share/bld/httpd-2.4.3/server/util_expr_parse.y
/usr/local/share/bld/httpd-2.4.3/server/util_expr_parse.y:28.1: invalid character: `%’
/usr/local/share/bld/httpd-2.4.3/server/util_expr_parse.y:28.2-4: parse error, unexpected “identifier”
make: 1254-004 The error code from the last command is 1.

Source: FULL ARTICLE at The UNIX and Linux Forums