LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-02-2012, 07:38 AM   #1
PBraun
LQ Newbie
 
Registered: Aug 2012
Posts: 1

Rep: Reputation: Disabled
Makefile works on ubuntu 12.04 LTS, but not on redhat


I wrote a multithreading program on my Ubuntu 12.04 and now want to run it on a SGI cluster running Red Hat Enterprise Linux Server release 6.3. It runs fine on my ubuntu, but has the usual

makefile:1: * missing separator. Stop.

error when running make on the server machine.

here is my makefile:

Code:
HDF5DIR = /cfel/common
#HDF5DIR = /usr


#INC_DIR = /usr/local/include
#LIB_DIR = /usr/local/lib
INC_DIR = /cfel/common/include
LIB_DIR = /cfel/common/lib
LIBS = -lm -lstdc++ -lpthread -lhdf5 -lfftw3 -lfftw3f -lfftw3f_threads -        lfftw3_threads

SHELL       = /bin/sh

CC      = g++
CFLAGS      = -g -O3 -ffast-math -mtune=native -msse3 -msse4
C_FLAGS     = -I$(INC_DIR) -I$(HDF5DIR)/include $(CFLAGS) -c

LD      = g++
LDFLAGS     = -g -O3 -ffast-math -mtune=native -msse3 -msse4
$(LDFLAGS)
LD_FLAGS    = -L$(LIB_DIR) -L$(HDF5DIR)/lib $(LIBS) $(LDFLAGS)


OBJ_FILES   = phaseit3d.o global.o settings.o data2d.o data3d.o fftwData.o worker.o
EXE_FILE    = phaseit3d


.cpp.o : Makefile $*.h
    $(CC) $(C_FLAGS) $*.cpp -o $*.o

all : $(OBJ_FILES) Makefile
    $(LD) $(OBJ_FILES) $(LD_FLAGS) -o $(EXE_FILE)

clean : 
    rm $(OBJ_FILES)
Can anyone spot my mistake? Any differences between those distributions? I used tabs in the important places, and the error says it's on line 1, very strange
 
Old 08-02-2012, 07:56 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387
This doesn't look correct:
Code:
LIBS = -lm -lstdc++ -lpthread -lhdf5 -lfftw3 -lfftw3f -lfftw3f_threads -        lfftw3_threads
Shouldn't that be:
Code:
LIBS = -lm -lstdc++ -lpthread -lhdf5 -lfftw3 -lfftw3f -lfftw3f_threads -lfftw3_threads
 
  


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
LXer: Ubuntu 12.04 LTS KVM Virtualization Battles 8.04.4, 10.04.4 LTS LXer Syndicated Linux News 0 04-09-2012 12:40 PM
Problem compiling driver from makefile on Ubuntu 10.04 LTS x86 Facepalm41 Linux - Newbie 2 01-29-2012 10:51 PM
No enough space error when trying upgrade ubuntu from 8.04 lts to 10.04 lts flik shen Ubuntu 5 06-15-2010 01:44 PM
Applet works on Windows, Ubuntu and Mac, but not on Redhat and Fedora bhaskar_e Programming 3 10-22-2008 03:00 AM
LXer: I update Ubuntu 6.06 LTS and 8.04 LTS ... one has SSH issues, one does not LXer Syndicated Linux News 0 05-20-2008 08:30 AM


All times are GMT -5. The time now is 04:18 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