![]() |
| | #1 | |
| Registered User Join Date: Jun 2009 Location: Socal, USA
Posts: 8
| Library troubles with makefile So two questions about this: 1) Initially I was having trouble locating required trig. functions like "sin" and "cos" and I (believe I) solved this by including the "tgmath.h" library in every source ".c" file that included the "math.h" library. Why would my "math.h" library not have the basic trig functions? 2) The error I now get is this: Quote:
Any help or observations are seriously appreciated. Let me know if I should provide more info | |
| mslate is offline | |
| | #2 |
| and the Hat of Guessing Join Date: Nov 2007
Posts: 8,740
| Not very familiar with tgmres or tgmath. Naturally sin and cos are in math.h. Were you getting compile errors or link errors? If the latter, you need to make sure that the math library is linked in (-lm). Otherwise, I would be interested to see what's going on, but I don't know how much I can help (certainly don't have smoldyn or fedora around). |
| tabstop is offline | |
| | #3 |
| Jaxom's & Imriel's Dad Join Date: Aug 2006 Location: Alabama
Posts: 801
| Why are you using 2.03 in place of 2.04? I don't even know what this software does, but I am compiling it right now. How long did it take to crap out on you? Andy |
| Kennedy is offline | |
| | #4 |
| Jaxom's & Imriel's Dad Join Date: Aug 2006 Location: Alabama
Posts: 801
| It passed. I didn't do a make install, but what I did do was Code: tar xf smoldyn-2.04.tgz cd smoldyn-2.04 ./configure make Andy |
| Kennedy is offline | |
| | #5 |
| Registered User Join Date: Jun 2009 Location: Socal, USA
Posts: 8
| tabstop: I was getting "undefined function" type errors, for all of the basic trig functions (cos, sin, etc.) that are supposedly in the math.h library. I'll try to recreate these errors and post them in a minute Kennedy: I'm compiling 2.03 instead of 2.04 for two reasons: 1) I've been running simulations from a successful 2.03 installation on my laptop Windows Vista so I'm trying to recreate and automate simulations on my linux desktop (so I can turn off my laptop at some point). 2) I do not have administrator access on the linux desktop so the OpenGL library (which is required for graphical output) is not available--my unix administrator guy hasn't figured it out. Regardless, the 2.03 documentation explains how to comment-out parts of the makefile and source so that the program can be compiled without the graphics part of the application. I decided installing 2.03 would be more likely to work based on the available instructions (the 2.04 documentation says that the compiling reference sectio may be outdated). By your advice, I've started compiling version 2.04 with commenting-out the same lines about graphics library dependencies. It seems to be working great but I'll post the outcome. Last edited by mslate; 06-29-2009 at 03:14 PM. |
| mslate is offline | |
| | #6 | |
| Registered User Join Date: Jun 2009 Location: Socal, USA
Posts: 8
| Well, it looks like I've exceeded my disk quota. I'll go talk to my unix admin guy about this, but is there a way to get around this? Should I have tried making the file just in /home/burritoman/smoldyn-2.04 instead of /home/burritoman/Desktop/smoldyn-2.04? How large was it for you Andy? Quote:
| |
| mslate is offline | |
| | #7 |
| Jaxom's & Imriel's Dad Join Date: Aug 2006 Location: Alabama
Posts: 801
| Crap, I deleted it. I'll redownload and let it build again. . . I'll let you know. Last time took about 35 minutes to complete, so I'll be back with you then. |
| Kennedy is offline | |
| | #8 |
| Jaxom's & Imriel's Dad Join Date: Aug 2006 Location: Alabama
Posts: 801
| Crap. . . I let it build last night and didn't post the results. . . without further adue: Code: # du -sh smoldyn-2.04 227M smoldyn-2.04 Andy |
| Kennedy is offline | |
| | #9 | |
| Registered User Join Date: Jun 2009 Location: Socal, USA
Posts: 8
| Thanks Andy, My admin gave me plenty more disk space, but now I'm running into new compile errors due to some undefined functions in the libmoleculizer directory (XML stuff): Quote:
Max | |
| mslate is offline | |
| | #10 |
| Jaxom's & Imriel's Dad Join Date: Aug 2006 Location: Alabama
Posts: 801
| Are you using the commands Code: tar xf smoldyn-2.04.tgz cd smoldyn-2.04 ./configure make ./configure is supposed to determine your environment (thus eliminate the need for you to do _ANY_ coding in C, or compiling for that matter). Do you get errors when you run ./configure? Are you supplying additional parameters to ./configure? Can you post _EXACTLY_ what you are doing (each command like I did above). Which version of Fedora are you using? |
| Kennedy is offline | |
| | #11 | ||
| Registered User Join Date: Jun 2009 Location: Socal, USA
Posts: 8
| Alright, here's what happens: Redownload compressed smoldyn-2.04.tgz Code: tar xvf smoldyn-2.04.tgz cd smoldyn-2.04 ./configure make Quote:
Code: 103 GLUT_CFLAGS =
104 GLUT_LIBS =
105 GLU_CFLAGS = -pthread
106 GLU_LIBS = -lGLU -lGL -lm
107 GL_CFLAGS = -pthread
108 GL_LIBS = -lGL -lm
Now I try: make clean ./configure make The compiling proceeds pretty well for about ten minutes before I hit this error: Quote:
Max | ||
| mslate is offline | |
| | #12 |
| Kernel hacker Join Date: Jul 2007 Location: Farncombe, Surrey, England
Posts: 15,686
| That sounds like you are missing a required library (and perhpas ./configure & make doesn't realize and/or report the problem correctly). An educated guess based on the names of the missing functions is that you are missing a compression library, perhaps zlib? [by missing, I mean either that the library itself is missing from your installation of linux, or that you have a bad makefile that should say somewhere that "use this library"]. I'm by no means sure it's zlib, but it's almost certainly some form of compression library! -- Mats
__________________ Compilers can produce warnings - make the compiler programmers happy: Use them! Please don't PM me for help - and no, I don't do help over instant messengers. |
| matsp is offline | |
| | #13 |
| Registered User Join Date: Sep 2004 Location: California
Posts: 2,845
| I think matsp is correct; you are not linking to zlib. You can verify by doing: Code: cd /home/burritoman/Desktop/smoldyn-2.04/source/Smoldyn gcc -pthread -I../lib -I../lib -I../libmoleculizer/src -I../../libmoleculizer/src -g -O2 -fexceptions -o smoldyn smolboxes.o smolcmd.o smolcomparts.o smolgraphics.o smolmolec.o smolmoleculizer.o smolport.o smolreact.o smolsim.o smolsurface.o smolthread.o smolwall.o smoldyn.o -lGL -lstdc++ -lm -lz ../lib/libsteve.a ../libmoleculizer/src/libmoleculizer/.libs/libmoleculizer.a -L/usr/lib/python2.5 -lpython2.5 ../libmoleculizer/libxml++-1.0.5/libxml++/.libs/libxmlpp.a |
| bithub is offline | |
| | #14 | |
| Registered User Join Date: Jun 2009 Location: Socal, USA
Posts: 8
| Quote:
| |
| mslate is offline | |
| | #15 |
| Jaxom's & Imriel's Dad Join Date: Aug 2006 Location: Alabama
Posts: 801
| If it gave you no output, did it make the smoldyn file? If so, ROCK, you scored. Attempt to run that puppy. |
| Kennedy is offline | |
![]() |
| Tags |
| compile, error, fedora, makefile |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| cannot find library in makefile | steve1_rm | C Programming | 8 | 01-28-2009 06:33 AM |
| Property Set Library (PSL) - Announcement | vultur_gryphus | Projects and Job Recruitment | 0 | 05-29-2008 06:04 AM |
| Makefile for a library | sirmoreno | Linux Programming | 5 | 06-04-2006 04:52 AM |
| very weird .h problem | royuco77 | C++ Programming | 1 | 09-11-2005 07:55 AM |
| Borland 5.5 Makefile woes... | gprogga | C++ Programming | 3 | 06-01-2003 02:20 AM |