compiling eterm


I installed Xfree, fink, gimp and enlightenment (and a whole bunch of wm as well) and I am currently trying to compile eterm (the "nix" theme I use with enlightenment seems to use it a lot in the preconfigured buttons).

I downloaded the tarball and did:
./configure --host=powerpc-apple-freebsd

I first got a "malloc.h" file not found error. I copied the malloc.h file I had in my /usr/include/sys folder to the source folder for eterm and I tried "make" again. It got a little further but now gave me this:
/usr/bin/ld: Undefined symbols:
make[2]: *** [] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive-am] Error 2

What now?

Your probably trying to get a library compiled. Alot of apps compile up a lib
of oft-used functions and then link it into the main app.

Anyway, your probably just missing the -undefined supress option.
Well, I just built eterm 0.9 fine on my machine.

I used --disable-utmp and --enable-shared=no to suppress dynamic libraries.

Here is the last line of the build:

/bin/sh ../libtool --mode=link gcc -traditional-cpp -I/usr/local/include -I/usr/X11R6/include -o Eterm -rpath /usr/local/lib:/usr/local/lib/Eterm main.o ../libmej/ -L/usr/local/lib -L/usr/local/lib -lImlib -L/usr/local/lib -lImlib -ljpeg -ltiff -lungif -lpng -lz -L/usr/X11R6/lib -lSM -lICE -lXext -lX11 -lXext -L/usr/X11R6/lib -lX11
gcc -traditional-cpp -I/usr/local/include -I/usr/X11R6/include -o Eterm main.o .libs/libEterm.a ../libmej/.libs/libmej.a -L/usr/local/lib -L/usr/local/lib -lImlib -L/usr/local/lib -lImlib -ljpeg -ltiff -lungif -lpng -lz -L/usr/X11R6/lib -lSM -lICE -lXext -lX11 -lXext -L/usr/X11R6/lib -lX11

So, as you can see, there is a libmej.a (like I thought there would be). Your
compile is trying to build a dynamic version of it and since you have the wrong flags, its complaining about the missing _main. Since this library is so small and pointed, its not really worth it to build it dynamically.

Is that any clearer? :confused:
... where do you specify those commands? It may seem very obvious to you but this is the first time I am trying to compile an application without using fink!

Do you input those at the configure phase? Did you change the source code in any way?

Thanks a lot for your patience... I am learning!

Yes, those are command line options to 'configure'.

You can always see what 'configure' can handle by doing
a './configure --help'.

In this case, we're turning off utmp (last login info (there was
a bit of a problem and I wasn't in the mood to explore it) and
we also tell configure to not make dynamic libraries (well,
actually, we tell configure not to build libtool to not make
dynamic libraries).
I was able to go a little further but I still got some errors. I think most of the problems arise because Fink installed most of my stuff in /sw/*. The compiler does not seem to find everything it needs. I added /sw/ to many paths in the configure file and I was able to get a little further.

I still get this during configure:
checking for Imlib_init in -lImlib... (cached) no
WARNING: Imlib was not found or did not correctly link.
Please check config.log to see what the error was.
I will attempt to continue, but things may go wrong.
configure: warning: WARNING: libImlib not found. Attempting to continue anyway.

And this during the make phase:
cc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -I../libmej -I.. -I/usr/local/sw/include -I/usr/local/include -I/usr/X11R6/include -g -O2 -c command.c -o command.o
command.c:6460: illegal expression, found `void'
command.c:3230: parse error in conditional expression
cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode
make[2]: *** [command.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive-am] Error 2

I guess I will have to wait for someone to post the binaries or for the package to appear in the Fink listings...

Thanks again for the info.
Well, the question is 'do you actually have Imlib?' If not, you need it.
If you do, then configure cant find it and you would need to add


to the configure command (again, try configure --help to see what you can

The other problem can be overcome by running this command before any
configure command.

setenv CFLAGS -traditional-cpp
I downloaded the 0.9 and tried again and this time, it worked even if I still got the "missing imlib" error in the configure phase.

I probably screwed the 0.8 configure file during my previous attempts.

Time to try something else!

Thank you very much for your help.