LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 02-07-2020, 03:51 PM   #1
margu
LQ Newbie
 
Registered: Sep 2012
Posts: 5

Rep: Reputation: Disabled
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?
 
Old 02-07-2020, 06:28 PM   #2
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: A few
Posts: 4,140

Rep: Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162
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?
 
Old 02-08-2020, 06:05 AM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 13,422
Blog Entries: 9

Rep: Reputation: 3668Reputation: 3668Reputation: 3668Reputation: 3668Reputation: 3668Reputation: 3668Reputation: 3668Reputation: 3668Reputation: 3668Reputation: 3668Reputation: 3668
Do you need to compile it yourself?
On my distro, openmotif 2.3.8 is in the repos.
 
Old 02-08-2020, 07:56 AM   #4
margu
LQ Newbie
 
Registered: Sep 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
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.
 
Old 02-08-2020, 08:03 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,325

Rep: Reputation: 3583Reputation: 3583Reputation: 3583Reputation: 3583Reputation: 3583Reputation: 3583Reputation: 3583Reputation: 3583Reputation: 3583Reputation: 3583Reputation: 3583
# 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

-
 
Old 02-08-2020, 09:10 AM   #6
margu
LQ Newbie
 
Registered: Sep 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
# 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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Motif X/Motif File Manager ? Xeratul Linux - Software 3 06-17-2017 09:14 AM
compling error tootz Linux - Software 3 02-22-2011 02:53 PM
getting error: invalid conversion from ‘const char*’ to ‘int’ while compling paulie1 Programming 14 02-25-2009 03:50 PM
kde3.4 kdegraphic compling error! ngan_yine Slackware 6 03-17-2005 02:48 PM
gcc-3.3.3 compling(configure-target-libiberty error 1) windus Linux - Software 0 04-18-2004 01:38 PM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 03:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration