Compiling Hugin 2023.0.0 on Ubuntu 22.04

72 views
Skip to first unread message

Gianni Caldonazzi

unread,
Jan 5, 2024, 4:06:50 AM1/5/24
to hugin and other free panoramic software
Hi I try compiling hugin on ubuntu 22.04 but I have problem.
I have download the package and extract in a folder, the run cmake as follow:

---------------------------------------------------


/opt/hugin/hugin-2023.0.0$ cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON /opt/hugin/hugin-2023.0.0
CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as

    project(ProjectName)

  near the top of the file, but after cmake_minimum_required().

  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error at celeste/CMakeLists.txt:71 (set_target_properties):
  set_target_properties called with incorrect number of arguments.


CMake Error at translations/CMakeLists.txt:7 (find_package):
  By not providing "FindMSGFMT.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "MSGFMT", but
  CMake did not find one.

  Could not find a package configuration file provided by "MSGFMT" with any
  of the following names:

    MSGFMTConfig.cmake
    msgfmt-config.cmake

  Add the installation prefix of "MSGFMT" to CMAKE_PREFIX_PATH or set
  "MSGFMT_DIR" to a directory containing one of the above files.  If "MSGFMT"
  provides a separate development package or SDK, be sure it has been
  installed.


CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.22)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred!



---------------------------------------------------

How can I resolve?
thankyou
Message has been deleted

T. Modes

unread,
Jan 5, 2024, 10:17:13 AM1/5/24
to hugin and other free panoramic software
Hi,

gianni.c...@gmail.com schrieb am Freitag, 5. Januar 2024 um 10:06:50 UTC+1:
Hi I try compiling hugin on ubuntu 22.04 but I have problem.
I have download the package and extract in a folder, the run cmake as follow:

---------------------------------------------------


/opt/hugin/hugin-2023.0.0$ cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON /opt/hugin/hugin-2023.0.0
CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as

    project(ProjectName)
<snip>
How can I resolve?

First you need to call CMake from a separate build directory and not try an in-tree build.

Second, you need to pass the root of the Hugin source to CMake and not the src sub-directory only.

Thomas

Gianni Caldonazzi

unread,
Jan 5, 2024, 12:19:02 PM1/5/24
to hugi...@googlegroups.com
Hi Thomas,
I try the commend:
/opt/hugin$ cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON hugin-2023.0.0

the content of /opt/hugin id
/opt/hugin$ ll
totale 12
drwxr-xr-x  3 lorenzo root    4096 gen  5 09:19 ./
drwxr-xr-x  9 root    root    4096 gen  5 09:17 ../
drwxrwxr-x 16 lorenzo lorenzo 4096 gen  5 18:12 hugin-2023.0.0/

the uncompressed directory is hugin-2023.0.0/
the content is:

/opt/hugin$ ll hugin-2023.0.0/
totale 192
drwxrwxr-x 16 lorenzo lorenzo  4096 gen  5 18:12 ./
drwxr-xr-x  3 lorenzo root     4096 gen  5 09:19 ../
-rwxrwx---  1 lorenzo lorenzo   169 lug 17  2011 AUTHORS*
-rwxrwx---  1 lorenzo lorenzo  4937 giu  9  2016 authors.txt*
drwxrwxr-x  3 lorenzo lorenzo  4096 gen  5 09:28 celeste/
-rwxrwx---  1 lorenzo lorenzo 14006 apr 16  2023 Changes.txt*
-rw-rw-r--  1 lorenzo lorenzo 14511 gen  5 09:28 CMakeCache.txt
drwxrwxr-x  4 lorenzo lorenzo  4096 gen  5 09:40 CMakeFiles/
-rwxrwx---  1 lorenzo lorenzo 35144 gen  5 09:32 CMakeLists.txt*
drwxrwx---  2 lorenzo lorenzo  4096 nov 11 08:29 CMakeModules/
-rwxrwx---  1 lorenzo lorenzo   941 lug 17  2011 cmake_uninstall.cmake.in*
-rwxrwx---  1 lorenzo lorenzo 18092 mag  8  2016 COPYING.txt*
drwxrwx---  2 lorenzo lorenzo  4096 nov 11 08:29 Debian/
drwxrwxr-x  3 lorenzo lorenzo  4096 gen  5 09:28 deghosting/
drwxrwx---  3 lorenzo lorenzo  4096 nov 11 08:29 doc/
drwxrwxr-x  4 lorenzo lorenzo  4096 gen  5 09:28 foreign/
drwxrwxr-x  3 lorenzo lorenzo  4096 gen  5 09:28 hugin_base/
drwxrwxr-x  5 lorenzo lorenzo  4096 gen  5 09:28 hugin_cpfind/
-rwxrwx---  1 lorenzo lorenzo  6226 feb 24  2023 INSTALL_cmake*
drwxrwx---  3 lorenzo lorenzo  4096 nov 11 08:29 mac/
drwxrwx---  5 lorenzo lorenzo  4096 nov 11 08:29 platforms/
-rwxrwx---  1 lorenzo lorenzo  4599 ott 31  2018 README*
-rwxrwx---  1 lorenzo lorenzo    12 nov 11 08:28 rev.txt*
drwxrwx--- 12 lorenzo lorenzo  4096 nov 11 08:29 src/
-rwxrwx---  1 lorenzo lorenzo  2140 lug 17  2011 TODO*
drwxrwxr-x  3 lorenzo lorenzo  4096 gen  5 09:28 tools/
drwxrwxr-x  3 lorenzo lorenzo  4096 gen  5 09:28 translations/

 I don't understand, I'm not in the source folder for cmake and pass the correct folder for hugin, but the error is the same.

What's wrong?


--
A list of frequently asked questions is available at: http://wiki.panotools.org/Hugin_FAQ
---
You received this message because you are subscribed to a topic in the Google Groups "hugin and other free panoramic software" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/hugin-ptx/7NcM6oR7kCI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to hugin-ptx+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hugin-ptx/3a90339a-263c-4a71-8715-c935fbd3cc1dn%40googlegroups.com.

T. Modes

unread,
Jan 5, 2024, 2:10:38 PM1/5/24
to hugin and other free panoramic software
gianni.c...@gmail.com schrieb am Freitag, 5. Januar 2024 um 18:19:02 UTC+1:
Hi Thomas,
I try the commend:
/opt/hugin$ cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON hugin-2023.0.0

the content of /opt/hugin id
/opt/hugin$ ll
totale 12
drwxr-xr-x  3 lorenzo root    4096 gen  5 09:19 ./
drwxr-xr-x  9 root    root    4096 gen  5 09:17 ../
drwxrwxr-x 16 lorenzo lorenzo 4096 gen  5 18:12 hugin-2023.0.0/

That looks good.

-rw-rw-r--  1 lorenzo lorenzo 14511 gen  5 09:28 CMakeCache.txt

 I don't understand, I'm not in the source folder for cmake and pass the correct folder for hugin, but the error is the same.

What's wrong?
There are still temporary files from the first wrong call in the directory.
Delete the complete directory and extract newly from the tarball to be on the right side.

Do you have write access to the /opt folder?

If it happens again please attach the complete log.
What is your CMake version?

Just for the mentioned warnings/errors:

CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as

    project(ProjectName)

in ./CMakeLists.txt, line 61 is
project(hugin)

CMake Error at translations/CMakeLists.txt:7 (find_package):
  By not providing "FindMSGFMT.cmake" in CMAKE_MODULE_PATH this project has

in the source tarball there is a file CMakeModules/FindMSGFMT.cmake

CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.22)

line 3 in ./CMakeLists.txt is
cmake_minimum_required(VERSION 3.8 FATAL_ERROR )

So if you pass the correct root folder I have no idea why CMakes complains about these lines, because the necessary lines/file are there.

Thomas

Gianni Caldonazzi

unread,
Jan 5, 2024, 2:45:12 PM1/5/24
to hugi...@googlegroups.com
Thanks for the pointers, I will try to start from scratch tomorrow and see if I solve it. 
Gianni
Reply all
Reply to author
Forward
0 new messages