LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 06-25-2003, 07:27 AM   #1
ph0enix
LQ Newbie
 
Registered: Jun 2003
Location: Czech Republic, Prague
Distribution: SuSE
Posts: 3

Rep: Reputation: 0
mps compilation failed


Hi all
I want to compile mps 1.1 from mosix.org, but fails with

Quote:
gcc -O2 -march=i486 -mcpu=i686 -I.. -Wall -MM -MG alloc.c compare.c devname.c ksym.c output.c pwcache.c readproc.c signals.c status.c sysinfo.c version.c whattime.c > .depend
compare.c:104:13: pasting "->" and "user" does not give a valid preprocessing token
compare.c:104:13: pasting "->" and "user" does not give a valid preprocessing token
compare.c:105:12: pasting "->" and "cmd" does not give a valid preprocessing token
compare.c:105:12: pasting "->" and "cmd" does not give a valid preprocessing token
compare.c:108:12: pasting "->" and "uid" does not give a valid preprocessing token
...
compare.c:144:14: pasting "->" and "share" does not give a valid preprocessing token
compare.c:144:14: pasting "->" and "share" does not give a valid preprocessing token
make[1]: *** [.depend] Error 1
make[1]: Leaving directory `/usr/src/packages/BUILD/mps-1.1/proc'
make: *** [proc/libproc.a] Error 2
Bad exit status from /var/tmp/rpm-tmp.74840 (%build)
Operation System is a clean Suse 8.2 with gcc 3.3
 
Old 02-03-2005, 03:09 PM   #2
invisibledooley
LQ Newbie
 
Registered: Jan 2005
Distribution: SuSE, OpenBSD
Posts: 3

Rep: Reputation: 0
I had the very same problem!

I realize that this is a couple of years late to help you, but I had the same problem (on SuSE 8.2, with gcc 3.3). But (for posterity) Here's how (after much soul-searching) I fixed it.

In mps-1.1/proc/compile.c, edit the macros and remove the ## marks before each occurrence of NAME. It worked for me, and we have essentially the same system specs.
 
Old 02-04-2005, 02:54 AM   #3
ph0enix
LQ Newbie
 
Registered: Jun 2003
Location: Czech Republic, Prague
Distribution: SuSE
Posts: 3

Original Poster
Rep: Reputation: 0
Re: I had the very same problem!

Quote:
Originally posted by invisibledooley
I realize that this is a couple of years late to help you, but I had the same problem (on SuSE 8.2, with gcc 3.3). But (for posterity) Here's how (after much soul-searching) I fixed it.

In mps-1.1/proc/compile.c, edit the macros and remove the ## marks before each occurrence of NAME. It worked for me, and we have essentially the same system specs.
Not compile.c, but compare.c (probably typo). It is the same solution i used. Sorry for missing post with problem solution.

Code:
--- mps-1.1/proc/compare.c      1998-10-02 23:34:07.000000000 +0200
+++ mps-1.1-new/proc/compare.c  2003-07-01 11:53:08.000000000 +0200
@@ -85,13 +85,13 @@
 */
 #define CMP_STR(NAME) \
 int cmp_ ## NAME(proc_t** P, proc_t** Q) { \
-    return strcmp((*P)-> ## NAME, (*Q)-> ## NAME); \
+    return strcmp((*P)->NAME, (*Q)->NAME); \
 }
 
 #define CMP_INT(NAME) \
 int cmp_ ## NAME (proc_t** P, proc_t** Q) { \
-    if ((*P)-> ## NAME < (*Q)-> ## NAME) return -1; \
-    if ((*P)-> ## NAME > (*Q)-> ## NAME) return  1; \
+    if ((*P)->NAME < (*Q)->NAME) return -1; \
+    if ((*P)->NAME > (*Q)->NAME) return  1; \
     return 0; \
 }
 
Old 02-09-2005, 04:37 PM   #4
invisibledooley
LQ Newbie
 
Registered: Jan 2005
Distribution: SuSE, OpenBSD
Posts: 3

Rep: Reputation: 0
Errata

I made a slight mistake in my correction: remove the ## directive from all parts of the compare functions except for in the function name (where you actually want it to paste).

original:

#define CMP_STR(NAME) \
int cmp_ ## NAME(proc_t** P, proc_t** Q) { \
- return strcmp((*P)-> ## NAME, (*Q)-> ## NAME); \
+ return strcmp((*P)->NAME, (*Q)->NAME); \
}


revised:

#define CMP_STR(NAME) \
int cmp_ ## NAME(proc_t** P, proc_t** Q) { \
- return strcmp((*P)-> NAME, (*Q)-> NAME); \
+ return strcmp((*P)-> NAME, (*Q)-> NAME); \
}

If you got the code to work, you probably did likewise.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Failed Dependency: Error during Compilation Lawrentium Linux - Software 3 10-27-2005 09:58 AM
pdflatex foo.mps (mpost?? Xfig??) kaz2100 Linux - Software 8 06-19-2005 04:52 AM
online_update failed - ERROR(Media:connection failed)[Connect failed] rover Suse/Novell 8 02-22-2005 07:57 AM
Compilation of lt_modem.ko failed matt_com911 Linux - Hardware 27 12-27-2004 03:58 AM
wget won't authenticate with a MPS 2.0 Proxy graywind Linux - Networking 0 12-16-2003 01:49 AM


All times are GMT -5. The time now is 02:20 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration