LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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, 02: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, 05:28 PM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
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, 05:05 AM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Do you need to compile it yourself?
On my distro, openmotif 2.3.8 is in the repos.
 
Old 02-08-2020, 06: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, 07:03 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 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, 08: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



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 08:14 AM
compling error tootz Linux - Software 3 02-22-2011 01:53 PM
getting error: invalid conversion from ‘const char*’ to ‘int’ while compling paulie1 Programming 14 02-25-2009 02:50 PM
kde3.4 kdegraphic compling error! ngan_yine Slackware 6 03-17-2005 01:48 PM
gcc-3.3.3 compling(configure-target-libiberty error 1) windus Linux - Software 0 04-18-2004 12:38 PM

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

All times are GMT -5. The time now is 04:55 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
Open Source Consulting | Domain Registration