Before Gentoo upgrade, users can still use libpng normally. After upgrading Gentoo system, many users have libpng compiled abnormally. A large number of packages can't be compiled. The following small series will introduce you to solve libpng. Compile an abnormal method.
After you have upgraded the system, you are prompted to upgrade libpng, need to re-emerge @ preserved-rebuild, but many packages fully compiled, however, and the following solutions.
1, gnome-extra/libgda failed to compile
At the time of the link, the prompt -lpng14 could not be found, obviously because libpng was upgraded to 1.5. However, after searching all the Makefiles in libgda, there is no place to find a place to link to the dynamic link library of libpng14. The last reason to find it is because there are many xxx.la files in the /usr/lib64/directory, which is used by libtool to manage dependencies. Some of the dynamic link libraries have a dependency named -lpng14.
After finding the reason, first find all the places where the write-lpng14 is written by the grep command, and re-emerge these libraries. However, some libraries were found to be re-emerged, and the dependencies were still not corrected. Finally, by manually changing these files, change to -lpng15.
Re-emerge is OK.
2, opencv compiler failed
opencv compiler failed, the prompt is error: & lsquo; MAX_MEM_LEVEL & rsquo; was not declared in this scope and other errors. Because libpng1.5.x hides the original png file structure, there is only one pre-declaration and a bunch of typedefs in the header file. These should be the zlib that was originally relied upon when defining these png image structures, and now you can't rely on them indirectly.
The solution is to write a patch that forces the modules/highgui/src/grfmt_png.cpp file to include the zlib.h header file. The patch content is as follows:
— modules/highgui/src /grfmt_png.cpp.old 2011-09-19 19:36:49.759516862 +0800
+++ modules/highgui/src/grfmt_png.cpp 2011-09-19 19:28:04.302185712 +0800
@@ -55,6 +55,7 @@
#include "libpng/png.h"
#else
#include "png. h》
+#include zlib.h
#endif
#include “grfmt_png.hpp”
Write a local portage, compile Ok opencv
There is also wxPython, this is really no way, because libpng1.5.x hides the png image structure, resulting in the original access to the structure directly through the structure pointer error, no patch.
The above is the solution to the problem that libpng can't be compiled after Gentoo upgrade. This article introduces the solutions of the two situations, which can be solved according to the user's specific situation.
Linux command reconfig can be used to convert configuration files, mainly used in XF86Config. The us
Linux system users need to install other extension packages when using R language to connect to SQL
The serial port settings under Linux include the baud rate, the number of data bits
The rmdir and rm commands are deleted commands on Linux systems. The difference is
How to view and shut down SELinux on Linux systems
Linux off screen splash screen method
Linux how to use the whereis command to quickly find the file
Linux system how to re-mount var partition
How to install tracking tool jira
Ubuntu tips for installing Visual Studio Code
The specific steps of installing Flash plugin in Firefox in Linux
Suggestions for Linux system desktops
Linux crontab command use instance summary
What should I do if Linux cannot be full screen under VMWare VM?
Ubuntu dual system does not have a bootable device solution
Conceptual Analysis of Linux Disk Partitions and File Systems
XP system w3wp.exe process CPU usage 100% of the reasons and solutions
How to repair/delete the Metro Necrotic application via PowerShell
What is the win10 mobile phone companion? What is the
Win7 install vs and xampp after 80 ports conflict processing skills
Win10's most detailed optimization settings Perfectly solve the disk 100% occupation
How to open the calculator of Win10 system? Where is the calculator path
How to play the ancient century de Cannes ghost ship
24 enhanced linux security tips
What is the reason for installing XP system without finding a hard drive?