Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi guys, I'm a relatively new Linux user on a Ubuntu machine. I've been trying to install a software called grackle and I've been having some trouble setting it up. Specifically, the issue seems to be that gcc doesn't recognize a compile flag '-DPIC' being entered by the Makefile. Here's the terminal output that I get:
-fPIC is a valid option. Otherwise need to know what OS, which compiler, which version of grackle and other important information. Dropping in an error message is not enough to help you. http://www.catb.org/~esr/faqs/smart-...html#beprecise
Thanks for the responses. The link JJJCR posted is the one I've been using to perform the installation. There isn't really any documentation of bugs on that page, so I've had to turn to other resources.
In terms of further details about my system and the software itself, I'm using Ubuntu 20.04 as my distro and I'm working with the latest GitHub release of grackle, which is v3.1.1. Before posting here I wanted to get a better idea of what the '-DPIC' flag is and whether anyone else has had a similar issue using gcc. Google searches yielded no results and I couldn't find any references to the flag in the documentation for various versions of gcc. As pan64 said, -fPIC seems to be a valid option, as do other similar flags ending in 'PIC', but not -DPIC. Needless to say, I'm pretty confused.
I imagine the information I've just provided still isn't completely sufficient to get help. I haven't taken any diagnostic steps to isolate the problem because of how poorly I understand it. Let me know if there's any more information I can give to further clarify the issue. Thanks again!
I wanted to get a better idea of what the '-DPIC' flag is
This is just the -D option to cpp (C preprocessor) that defines macro PIC with the value of 1. Basically, the same as #define PIC 1 in the code. It is inserted by libtool when generating flags for building a shared library.
This macro is rarely used, mostly in inline assembler code like this:
this is the error message: x86_64-conda_cos6-linux-gnu-cc: unrecognized option '-DPIC' we need to handle.
the question why this compiler does not accept -D?
As I see newer libtool implementations use both -fPIC and -DPIC. Probably this x86_64-conda_cos6-linux-gnu-cc is just too old, but I can only guess....
Thanks for all the replies! the conda --version command tells me I'm running version 4.8.2. It seems that the latest version may be 4.8.3, but as I understand it Grackle is not a particularly new piece of code, so I would think that 4.8.2 should be up-to-date enough. It appears that I'm working with version 2.4.6 of libtool, which also seems to be relatively up to date.
I feel like I should mention that I've previously had issues with x86_64-conda_cos6-linux-gnu-cc. During an initial attempt at building Grackle on my machine I got an error saying that libtool was looking for x86_64-conda_cos6-linux-gnu-cc in a non-existent subdirectory of my /tmp/ folder. I was instructed by other Grackle users to create this subdirectory and put a soft link to x86_64-conda_cos6-linux-gnu-cc in it to resolve the issue, which worked but now I'm getting the current issue. Not sure if this information carries any weight but I thought it might be good to mention since pan64 brought up that file.
It's starting to sound like the issue could be either anaconda related (perhaps x86_64-conda_cos6-linux-gnu-cc) or something with libtool. Thanks again for all the help!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.