LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Enterprise (https://www.linuxquestions.org/questions/linux-enterprise-47/)
-   -   error when compling motif (https://www.linuxquestions.org/questions/linux-enterprise-47/error-when-compling-motif-4175669180/)

margu 02-07-2020 02:51 PM

error when compling motif
 
I am trying to compile motif 2.3.8 on RHEL 7.7.
The compilation stops with the following error:

libtool: link: gcc -g -O2 -Wall -g -fno-strict-aliasing -Wno-unused -Wno-comment -fno-tree-ter -I/usr/include/freetype2 -I/usr/include/uuid -I/usr/include/libpng15 -o wmluiltok wmluiltok.o -lXp -lfontconfig -lfreetype -lXft -ljpeg -lpng
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
make[2]: *** [wmluiltok] Error 1

Has anybody else faced this error and how did you solve it?

berndbausch 02-07-2020 05:28 PM

I'd have a closer look at wmluiltok.o. It's this file that should define main. You could use nm to list the symbols, but there might be other tools that accomplish that.

Perhaps remove wmluiltok.o and restart the make? Or remove it and run make wmluiltok.o?

ondoho 02-08-2020 05:05 AM

Do you need to compile it yourself?
On my distro, openmotif 2.3.8 is in the repos.

margu 02-08-2020 06:56 AM

Quote:

Originally Posted by berndbausch (Post 6087447)
I'd have a closer look at wmluiltok.o. It's this file that should define main. You could use nm to list the symbols, but there might be other tools that accomplish that.

Perhaps remove wmluiltok.o and restart the make? Or remove it and run make wmluiltok.o?

I added the following line at the top of wmluiltok.l
%option main

It solved the problem.

knudfl 02-08-2020 07:03 AM

# yum install motif-devel
... will install motif version 2.3.4 ...

Fedora 31 still has version 2.3.4 : Seven patches required to build.
And fourteen patches are used to build the CentOS 7.7 motif.

Some OS, e.g. Debian Sid has a motif 2.3.8 : 17 patches → http://deb.debian.org/debian/pool/ma....debian.tar.xz

Motif `BuildRequires:´ for CentOS 7.7 →
automake libtool autoconf flex flex-devel flex-static byacc pkgconfig libjpeg-devel libpng-devel libXft-devel, libXmu-devel libXp-devel libXt-devel libXext-devel xorg-x11-xbitmaps perl

-

margu 02-08-2020 08:10 AM

Quote:

Originally Posted by knudfl (Post 6087606)
# yum install motif-devel
... will install motif version 2.3.4 ...

Fedora 31 still has version 2.3.4 : Seven patches required to build.
And fourteen patches are used to build the CentOS 7.7 motif.

Some OS, e.g. Debian Sid has a motif 2.3.8 : 17 patches → http://deb.debian.org/debian/pool/ma....debian.tar.xz

Motif `BuildRequires:´ for CentOS 7.7 →
automake libtool autoconf flex flex-devel flex-static byacc pkgconfig libjpeg-devel libpng-devel libXft-devel, libXmu-devel libXp-devel libXt-devel libXext-devel xorg-x11-xbitmaps perl

-

Interesting.
I noticed that someone else installed flex on the server this morning. I don't know if this solved my error or if it was the fix I posted in this thread. Anyway, motif-2.3.8 is successfully built now.


All times are GMT -5. The time now is 04:36 AM.