Upgraded to Ubuntu 9 and now can't compile

I just upgraded my Ubuntu to the latest version 9.02 and now I can’t compile in codeblocks.

  
  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|19|warning: swscale.h: No such file or directory|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|20|warning: avformat.h: No such file or directory|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|27|error: ‘PixelFormat’ does not name a type|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|33|error: ‘PIX_FMT_YUV420P’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|34|error: ‘PIX_FMT_YUV420P’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|35|error: ‘PIX_FMT_YUV420P’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|36|error: ‘PIX_FMT_YUV410P’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|37|error: ‘PIX_FMT_YUV411P’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|38|error: ‘PIX_FMT_YUV422P’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|39|error: ‘PIX_FMT_GRAY8’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|40|error: ‘PIX_FMT_GRAY8’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|43|error: ‘PIX_FMT_GRAY8’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|45|error: ‘PIX_FMT_RGB565’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|46|error: ‘PIX_FMT_RGB555’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|47|error: ‘PIX_FMT_RGB32’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|48|error: ‘PIX_FMT_YUYV422’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|49|error: ‘PIX_FMT_UYYVYY411’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|51|error: ‘PIX_FMT_YUV422P’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|52|error: ‘PIX_FMT_YUV411P’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|53|error: ‘PIX_FMT_YUV420P’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|56|error: ‘PIX_FMT_UYVY422’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|57|error: ‘PIX_FMT_YUV411P’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|59|error: ‘PIX_FMT_YUV410P’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|60|error: ‘PIX_FMT_YUV422P’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|61|error: ‘PIX_FMT_YUV411P’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|62|error: ‘PIX_FMT_NV12’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|63|error: ‘PIX_FMT_NV21’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|64|error: ‘PIX_FMT_YUV422’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|65|error: ‘PIX_FMT_RGB32_1’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|66|error: ‘PIX_FMT_RGB555’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|67|error: ‘PIX_FMT_RGB565’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|70|error: ‘PIX_FMT_BGR32’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|73|error: ‘PIX_FMT_YUYV422’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|74|error: ‘PIX_FMT_GRAY8’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|77|error: ‘PIX_FMT_YUV444P’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|78|error: ‘PIX_FMT_GRAY16’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|79|error: ‘PIX_FMT_RGB24’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|82|error: ‘PIX_FMT_YUYV422’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|83|error: ‘PIX_FMT_YUYV422’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|84|error: ‘PIX_FMT_UYVY422’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|85|error: ‘PIX_FMT_GRAY8’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|86|error: ‘PIX_FMT_RGB555’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|87|error: ‘PIX_FMT_BGR555’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|88|error: ‘PIX_FMT_RGB565’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|89|error: ‘PIX_FMT_BGR565’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|90|error: ‘PIX_FMT_BGR24’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|91|error: ‘PIX_FMT_RGB24’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|94|error: ‘PIX_FMT_UYVY422’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|95|error: ‘PIX_FMT_UYVY422’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|97|error: ‘PIX_FMT_NONE’ was not declared in this scope|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|98|error: too many initializers for ‘const PixelFormatTag’|  
/media/Programing/CCV 006/trunk/tbeta/Linux/libs/openFrameworks/video/ofUCUtils.cpp|98|error: too many initializers for ‘const PixelFormatTag’|  
||More errors follow but not being shown.|  
||Edit the max errors limit in compiler options...|  
||=== Build finished: 50 errors, 2 warnings ===|  

I’m also getting on precompiled bins:

  
  
error while loading shared libraries: libavcodec.so.51: cannot open shared object file: No such file or directory  
  
and   
  
error while loading shared libraries: libPocoFoundation.so.2: cannot open shared object file: No such file or directory  
  
  

looks like the new ubuntu updated to .52 but it’s looking for .51

i had a similar problem when updating to jaunty, but someone told me some days ago that he updated to jaunty without problem so don’t know if it’s your case…

there’s 2 versions of libavcodec, libavformat… the normal ones and the unstripped packages. don’t know why but when updating, ubuntu, substituted the normal ones with the unstripped and the -dev packages need the normal ones so they were uninstalled.

in short, uninstall the unstripped packages, this will uninstall some programs, then install the normal ones and the applications that has been uninstalled and run again the install_dependencies script.

sudo apt-get remove libavcodec libavformat-unstripped libavutil-unstripped libswscale-unstripped

if you don’t want to uninstall the programs that have dependencies you can do this from synaptic the apps will be marked for removal but as soon as you mark the normal libraries for install you will be able to unmark them.

already wrote a comment in a related bug in ubuntu’s launch pad:

https://bugs.launchpad.net/bugs/312898

but it seems the mantainers doesn’t like the only possible solution, it has been accepted in debian though, so with some luck it should be fixed.

I can confirm I am getting a similar error after a fresh install of ubuntu 9.04 jaunty. But after checking in synaptic I see that the unstripped versions of the packages were not installed by default. The normal versions are installed and I am getting the same error.

can you try running the install_dependencies script again…

libgstreamer0.10-dev is already the newest version.
libgstreamer-plugins-base0.10-dev is already the newest version.
libavcodec-dev is already the newest version.
libavformat-dev is already the newest version.
libavutil-dev is already the newest version.
libswscale-dev is already the newest version.
freeglut3-dev is already the newest version.
libasound2-dev is already the newest version.
libxmu-dev is already the newest version.
libxxf86vm-dev is already the newest version.
g++ is already the newest version.
libgl1-mesa-dev is already the newest version.
libglu1-mesa-dev is already the newest version.
libraw1394-dev is already the newest version.
libpoco-dev is already the newest version.

Ah but here’s an interesting detail. I only get the error using the OF 0.06 release in Jaunty. OF 0.05 examples compile just fine. The output is:

/home/user/Code/of_preRelease_v0.06_linux_cb_FAT/libs/openFrameworks/video/ofUCUtils.cpp|19|warning: avformat.h: No such file or directory|
/home/user/Code/of_preRelease_v0.06_linux_cb_FAT/libs/openFrameworks/video/ofUCUtils.cpp|20|warning: swscale.h: No such file or directory|
/home/user/Code/of_preRelease_v0.06_linux_cb_FAT/libs/openFrameworks/video/ofUCUtils.cpp||In member function ‘void ofUCUtils::set_format(int, int)’:|
/home/user/Code/of_preRelease_v0.06_linux_cb_FAT/libs/openFrameworks/video/ofUCUtils.cpp|303|error: invalid conversion from ‘int’ to ‘PixelFormat’|
/home/user/Code/of_preRelease_v0.06_linux_cb_FAT/libs/openFrameworks/video/ofUCUtils.cpp|303|error: initializing argument 3 of ‘SwsContext* sws_getContext(int, int, PixelFormat, int, int, PixelFormat, int, SwsFilter*, SwsFilter*, double*)’|
||=== Build finished: 2 errors, 2 warnings ===|

mmh, ok this was only affecting debian unstable but it seems it’s in jaunty now…

substitute line 303 in ofUCUtils.cpp with:

  
  
sws_getContext(format.size.width, format.size.height, (PixelFormat)src_pix_fmt,  
			d_width, d_height, PIX_FMT_RGB24,  
			VIDEOGRABBER_RESIZE_FLAGS, NULL, NULL, NULL);  

That fixed it. :smiley:

I also had this problem recently but didn’t have time to report it. I also had some linking errors with libavcodec I think, it was expecting an older version of the library. Has any encountered this as well? I was installing onto a standalone PC and I don’t have access to it anymore…I ended up stripping out the video capture stuff to fix this as I was in a hurry

mmmh, that’s weird, i’m also getting the problem with pixelformat with the last libraries in jaunty, but not the linking problems. indeed there’s no library included in oF 006 that has dependencies with libavcodec, only in the code so there shouldn’t be any problem with the version as all the libraries that has dependencies with that (gstreamer) are installed at system level.

if anyone can reproduce this problem…

cerupcat, did you manage to solve this? also you were having problems with poco that is now compiled as static and in your error it’s looking for a shared library:

error while loading shared libraries: libPocoFoundation.so.2: cannot open shared object file: No such file or directory

any posibilities that you were trying with some pre 006 version?

Hmmm I’m not sure if it was something specific to my installation as someone else was running 9.04 with OF at the workshop i was at and I don’t think they reported the same problem…and I was probably stressed and rushing. I was just wondering if any one else had experienced this…

first post here 8)

I have to switch my macbook for a few days against a linux ubuntu 9.04 machine and had problems with the libavutils.

solved it with uninstalling the libavutils-extended in the synaptics paket manager and then run the check-dependecies script again. only disadvantageous are that the vlc player and the actual blender version depend on the -extended pakets.

hey, i don’t think vlc or blender are dependent on the unstripped versions, at least for me, at first they were removed because they depend on any of the packages so as you are removing them vlc will be removed too. But once you install the normal ones you should be able to install vlc and blender again.

@arturo: ok, thanks for the info - will try that.

I had this same issue too, from a clean install of Jaunty and the most recent release of .006 FAT. Arturo’s substitute code above fixed it. I prefer that for now over reconfiguring various packages :slight_smile:

I’m just installing 0.06 OF on a new laptop with 9.04 and I’m getting package errors on the dependencies script:

The following packages have unmet dependencies:
libavutil-dev: Depends: libavutil49 (= 3:0.svn20090303-1ubuntu6) but it is not going to be installed
E: Broken packages

Anyone had this problem? If I install libavutil49 it removes a whole lot of other media packages that depend on the more recent version, such as these:

The following packages will be REMOVED:
gstreamer0.10-ffmpeg gstreamer0.10-plugins-bad-multiverse libavcodec-unstripped-52
libavformat52 libavutil-unstripped-49 libmjpegtools-1.9 libquicktime1 vlc vlc-nox

Sorry, false alarm, Arturo’s instructions above fixed this.

I did the following:

  
sudo apt-get remove libavutil-unstripped-49  

This then removed the other unstripped versions plus the other stuff.
I then re-ran the dependencies install script and reinstalled the stuff that had been removed:

  
sudo apt-get install vlc gstreamer0.10-ffmpeg gstreamer0.10-plugins-bad-multiverse  

I also had the same problem, and Arturo’s substitute code fixed it for me. Thanks! :smiley:

[quote author=“jaime”]Ah but here’s an interesting detail. I only get the error using the OF 0.06 release in Jaunty. OF 0.05 examples compile just fine. The output is:

/home/user/Code/of_preRelease_v0.06_linux_cb_FAT/libs/openFrameworks/video/ofUCUtils.cpp|19|warning: avformat.h: No such file or directory|
/home/user/Code/of_preRelease_v0.06_linux_cb_FAT/libs/openFrameworks/video/ofUCUtils.cpp|20|warning: swscale.h: No such file or directory|
/home/user/Code/of_preRelease_v0.06_linux_cb_FAT/libs/openFrameworks/video/ofUCUtils.cpp||In member function ‘void ofUCUtils::set_format(int, int)’:|
/home/user/Code/of_preRelease_v0.06_linux_cb_FAT/libs/openFrameworks/video/ofUCUtils.cpp|303|error: invalid conversion from ‘int’ to ‘PixelFormat’|
/home/user/Code/of_preRelease_v0.06_linux_cb_FAT/libs/openFrameworks/video/ofUCUtils.cpp|303|error: initializing argument 3 of ‘SwsContext* sws_getContext(int, int, PixelFormat, int, int, PixelFormat, int, SwsFilter*, SwsFilter*, double*)’|
||=== Build finished: 2 errors, 2 warnings ===|[/quote]

I got the same warning, and I solved it by simply typecasting the third argument (I think it’s int src_pix_fmt or something) to a Pixel Format. As in:

Before:

  
/* ... */ src_pix_fmt, /* ... */  

After:

  
/* ... */ (PixelFormat)src_pix_fmt, /* ... */