|
Where's the typo? |
Bob Keane
Member #7,342
June 2006
|
I installed allegro 5 from sources and tried compiling a sample program but run into errors. I added pkg-config to the search path using export PKG_CONFIG_PATH=/Downloads/allegro-5.2.4.0/build/lib/pkgconfig
I compile using <code>gcc -Wall hello.c pkg-config --cflags --libs allegro-5.2.4.0 allegro_acodec-5.2.4.0 allegro_audio-5.2.4.0 allegro_color-5.2.4.0 allegro_dialog-5.2.4.0 allegro_font-5.2.4.0 allegro_image-5.2.4.0 allegro_main-5.2.4.0 allegro_memfile-5.2.4.0 allegro_physfs-5.2.4.0 allegro_primitives-5.2.4.0 allegro_ttf-5.2.4.0` Package allegro-5.2.4.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `allegro-5.2.4.0.pc' to the PKG_CONFIG_PATH environment variable I have verified the path to pkgconfig and for fun copied the folder to the same folder the source is in. Where is the typo? By reading this sig, I, the reader, agree to render my soul to Bob Keane. I, the reader, understand this is a legally binding contract and freely render my soul. |
Peter Hull
Member #1,136
March 2001
|
On my system I just use allegro-5. Does that work for you?
|
Bob Keane
Member #7,342
June 2006
|
No luck. bobkeane@localhost Documents]$ export PKG_CONFIG_PATH=/Downloads/allegro-5/build/lib/pkgconfig [bobkeane@localhost Documents]$ gcc -Wall hello.c `pkg-config --cflags --libs allegro-5 allegro_acodec-5 allegro_audio-5 allegro_color-5 allegro_dialog-5 allegro_font-5 allegro_image-5 allegro_main-5 allegro_memfile-5 allegro_physfs-5 allegro_primitives-5 allegro_ttf-5` Package allegro-5 was not found in the pkg-config search path. Perhaps you should add the directory containing `allegro-5.pc' to the PKG_CONFIG_PATH environment variable
By reading this sig, I, the reader, agree to render my soul to Bob Keane. I, the reader, understand this is a legally binding contract and freely render my soul. |
Elias
Member #358
May 2000
|
What is the output of: pkg-config --list-all | grep allegro -- |
Bob Keane
Member #7,342
June 2006
|
It is: pkg-config --list-all|grep allegro allegro allegro - Allegro game programming library
By reading this sig, I, the reader, agree to render my soul to Bob Keane. I, the reader, understand this is a legally binding contract and freely render my soul. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
That's for Allegro 4 I think. I might be wrong but I'm pretty sure Allegro 5 lists itself as such. Is that what you wanted? You need backticks around the pkg-config call as well. Also, pkg-config registers its own packages, and that path doesn't look right for pkg-config. Perhaps you didn't install properly? Do you have include/allegro5 in /usr/local ? Do you have allegro 5 libs in /usr/local/lib? Just link to them directly. pkg-config is a waste of time and energy unless you're static linking. Also, you probably want the monolith. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Bob Keane
Member #7,342
June 2006
|
I'm trying to use allegro 5, I copied the compile command from the wiki. The copy included the backticks, so I'm not sure why the were not in the post. The include/allegro5 folder is in usr/local, the allegro libs are in usr/local/lib, but the pkgconfig folder is there as well. Is that the problem, and where should it be? And I am thinking about static compiling so pkgconfig is a should have. As to the monoliths, where are they and where should be? By reading this sig, I, the reader, agree to render my soul to Bob Keane. I, the reader, understand this is a legally binding contract and freely render my soul. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
To get the monoliths, you need to compile with the cmake flag WANT_MONOLITH set to 'on'. (-DWANT_MONOLITH=on) Bob Keane, soul stealer said: the pkgconfig folder is there as well. That's the folder you need for your PKG_CONFIG_PATH variable. Remember to append it and not replace it though. export PKG_CONFIG_PATH=/usr/local/path/to/pkg-config:$PKG_CONFIG_PATH Then try running the pkg-config command by itself or use grep to list the packages again. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Bob Keane
Member #7,342
June 2006
|
Maybe I entered the export command incorrectly. This is what I typed: export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH This is what I get when I use grep: pkg-config --list-all|grep allegro allegro allegro - Allegro game programming library And are the monoliths important? I may have to reinstall if so. <edit> Edgar Reynaldo said: Bob Keane, soul stealer said: Everyone needs a hobby. By reading this sig, I, the reader, agree to render my soul to Bob Keane. I, the reader, understand this is a legally binding contract and freely render my soul. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
OpenSUSE said:
linux-u7hl:/usr/local/lib/pkgconfig # ls
Some update borked my Linux VBOX graphics EDIT My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Chris Katko
Member #1,881
January 2002
|
... which graphics are actually bad? -----sig: |
Edgar Reynaldo
Major Reynaldo
May 2007
|
The text is all chunky like peanut butter. The screenshot appears fine, but a photo reveals the difference : {"name":"611603","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/b\/f\/bfba54c9818b0c920167d7011f112aba.jpg","w":5344,"h":4008,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/b\/f\/bfba54c9818b0c920167d7011f112aba"} EDIT Updating VBox to 5.2.12 fixed it. xD Bob, I think you forgot to 'make install'. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Bob Keane
Member #7,342
June 2006
|
I remembered make install, I had to use the sudo command. I think I'll try installing with the monoliths. Maybe then I'll get code::blocks to work with it. <edit> Got it working in code::blocks.:D I had to hunt for some files but these instructions helped. By reading this sig, I, the reader, agree to render my soul to Bob Keane. I, the reader, understand this is a legally binding contract and freely render my soul. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
You shouldn't need sudo to install at all. Don't install to /usr thats dumb. Let allegro pick the default install folders which are /usr/local/include and /usr/local/lib . Those instructions are not the greatest. Really it shouldn't be this hard. I think the wiki has an article that explains it better : https://wiki.allegro.cc/index.php?title=Install_Allegro5_From_Git/Linux/Debian Except they give the same bad advice. Also I updated the version of allegro they tell you to checkout. You should be 'git checkout'ing 'master' or '5.2'. If you install to the default location, that is /usr/local. There's nothing wrong with that. Some users may have to run 'sudo ldconfig' before it will link properly but that's not hard, and it keeps allegro out of system libraries. That's what /usr/local is for. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Bob Keane
Member #7,342
June 2006
|
The install failed without using sudo, I never checked the logs but since it worked with sudo, I assumed it was a rights issue. I did use the default settings and everything is in usr/local. I'll have to try this weekend due to my schedule. Code::blocks locks up whenever I open the Blades of Exile sources, so I'm going to have to find another editor. Busy, busy, busy. By reading this sig, I, the reader, agree to render my soul to Bob Keane. I, the reader, understand this is a legally binding contract and freely render my soul. |
bamccaig
Member #7,536
July 2006
|
Bob Keane said: export PKG_CONFIG_PATH=/Downloads/allegro-5.2.4.0/build/lib/pkgconfig You have a Downloads directory in the root of the file system? That seems odd. Make sure it's an absolute path from the root. Also, verify the current value of the variable while testing: echo $PKG_CONFIG_PATH Ensure that the ownership/permissions/flags are correct as well. I also suggest finding all *.pc files in the system to verify. find / -iname '*.pc' Also, what OS are you running? Looks like either OS X, Linux, BSD, or some other Unix variant? -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
Bob Keane
Member #7,342
June 2006
|
Bamccaig said: You have a Downloads directory in the root of the file system? No I don't. Maybe I'm not using the correct path. I'm using Fedora. I'll see what happens Saturday. By reading this sig, I, the reader, agree to render my soul to Bob Keane. I, the reader, understand this is a legally binding contract and freely render my soul. |
bamccaig
Member #7,536
July 2006
|
You probably want ${HOME}/Downloads instead. But either way, verify your paths. I never "install" things into my Downloads directory so that's off on its own. I would move it to a more conventional place to work with, and ensure I know the path(s) to the headers for includes, libraries for linking, and shared objects/executables for runtime. Fedora should match this assumption. System packages will install libraries to /usr. Headers will be in /usr/include and shared objects or archives will be in /usr/lib. Executables will be in /usr/bin. It may be nested for 64-bit platform, but that's all the variance I would expect. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
|