unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Package building with gcc-10
@ 2020-11-16 12:48 Hamzeh Nasajpour
  2020-11-17 15:45 ` zimoun
  2020-11-18 18:17 ` Jan Wielkiewicz
  0 siblings, 2 replies; 3+ messages in thread
From: Hamzeh Nasajpour @ 2020-11-16 12:48 UTC (permalink / raw)
  To: SuarezMiguelC via

Hi guys.
I have a cpp Application that should be build with `gcc-toolchain-10.2.0`. I could build it in local. But seems that in package building the `cmake-build-system` is using the `gcc-7.5.0`. How can I set a specific version of gcc for building my package definition? 


```
...
/tmp/guix-build-my-cpp-app-0.1.1.drv-0/my-cpp-app/src/GUI/FileDownloader.h:27:10: fatal error: filesystem: No such file or directory
 #include <filesystem>
          ^~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/my-cpp-app.dir/build.make:121: CMakeFiles/my-cpp-app.dir/src/GUI/ContentList.cpp.o] Error 1
make[2]: Leaving directory '/tmp/guix-build-my-cpp-app-0.1.1.drv-0/build'
make[1]: *** [CMakeFiles/Makefile2:208: CMakeFiles/my-cpp-app.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 69%] Linking CXX executable test_DataAccessLayer
/gnu/store/89rj5fqcg48afgk99639ds602pgf92k4-cmake-minimal-3.16.5/bin/cmake -E cmake_link_script CMakeFiles/test_DataAccessLayer.dir/link.txt --verbose=1
/gnu/store/rn75fm7adgx3pw5j8pg3bczfqq1y17lk-gcc-7.5.0/bin/c++   -Wall -O2 -g -DNDEBUG  -rdynamic CMakeFiles/test_DataAccessLayer.dir/test_DataAccessLayer_autogen/mocs_compilation.cpp.o CMakeFiles/test_DataAccessLayer.dir/tests/TestDataAccessLayer.cpp.o  -o test_DataAccessLayer  /gnu/store/59dq1n4wj3maa3kcar6hspj2zd82as7q-qtbase-5.14.2/lib/libQt5Test.so.5.14.2 lib_my-cpp-app.a /gnu/store/59dq1n4wj3maa3kcar6hspj2zd82as7q-qtbase-5.14.2/lib/libQt5Widgets.so.5.14.2 /gnu/store/59dq1n4wj3maa3kcar6hspj2zd82as7q-qtbase-5.14.2/lib/libQt5Gui.so.5.14.2 /gnu/store/59dq1n4wj3maa3kcar6hspj2zd82as7q-qtbase-5.14.2/lib/libQt5Network.so.5.14.2 /gnu/store/59dq1n4wj3maa3kcar6hspj2zd82as7q-qtbase-5.14.2/lib/libQt5Sql.so.5.14.2 /gnu/store/59dq1n4wj3maa3kcar6hspj2zd82as7q-qtbase-5.14.2/lib/libQt5DBus.so.5.14.2 /gnu/store/59dq1n4wj3maa3kcar6hspj2zd82as7q-qtbase-5.14.2/lib/libQt5Core.so.5.14.2 -lrec 
[ 70%] Linking CXX executable test_AsyncTaskRunner
/gnu/store/89rj5fqcg48afgk99639ds602pgf92k4-cmake-minimal-3.16.5/bin/cmake -E cmake_link_script CMakeFiles/test_AsyncTaskRunner.dir/link.txt --verbose=1
/gnu/store/rn75fm7adgx3pw5j8pg3bczfqq1y17lk-gcc-7.5.0/bin/c++   -Wall -O2 -g -DNDEBUG  -rdynamic CMakeFiles/test_AsyncTaskRunner.dir/test_AsyncTaskRunner_autogen/mocs_compilation.cpp.o CMakeFiles/test_AsyncTaskRunner.dir/tests/TestAsyncTaskRunner.cpp.o  -o test_AsyncTaskRunner  /gnu/store/59dq1n4wj3maa3kcar6hspj2zd82as7q-qtbase-5.14.2/lib/libQt5Test.so.5.14.2 lib_my-cpp-app.a /gnu/store/59dq1n4wj3maa3kcar6hspj2zd82as7q-qtbase-5.14.2/lib/libQt5Widgets.so.5.14.2 /gnu/store/59dq1n4wj3maa3kcar6hspj2zd82as7q-qtbase-5.14.2/lib/libQt5Gui.so.5.14.2 /gnu/store/59dq1n4wj3maa3kcar6hspj2zd82as7q-qtbase-5.14.2/lib/libQt5Network.so.5.14.2 /gnu/store/59dq1n4wj3maa3kcar6hspj2zd82as7q-qtbase-5.14.2/lib/libQt5Sql.so.5.14.2 /gnu/store/59dq1n4wj3maa3kcar6hspj2zd82as7q-qtbase-5.14.2/lib/libQt5DBus.so.5.14.2 /gnu/store/59dq1n4wj3maa3kcar6hspj2zd82as7q-qtbase-5.14.2/lib/libQt5Core.so.5.14.2 -lrec 
[ 72%] Linking CXX executable test_RecDB
/gnu/store/89rj5fqcg48afgk99639ds602pgf92k4-cmake-minimal-3.16.5/bin/cmake -E cmake_link_script CMakeFiles/test_RecDB.dir/link.txt --verbose=1
/gnu/store/rn75fm7adgx3pw5j8pg3bczfqq1y17lk-gcc-7.5.0/bin/c++   -Wall -O2 -g -DNDEBUG  -rdynamic CMakeFiles/test_RecDB.dir/test_RecDB_autogen/mocs_compilation.cpp.o CMakeFiles/test_RecDB.dir/tests/TestRecDB.cpp.o  -o test_RecDB  /gnu/store/59dq1n4wj3maa3kcar6hspj2zd82as7q-qtbase-5.14.2/lib/libQt5Test.so.5.14.2 lib_my-cpp-app.a /gnu/store/59dq1n4wj3maa3kcar6hspj2zd82as7q-qtbase-5.14.2/lib/libQt5Widgets.so.5.14.2 /gnu/store/59dq1n4wj3maa3kcar6hspj2zd82as7q-qtbase-5.14.2/lib/libQt5Gui.so.5.14.2 /gnu/store/59dq1n4wj3maa3kcar6hspj2zd82as7q-qtbase-5.14.2/lib/libQt5Network.so.5.14.2 /gnu/store/59dq1n4wj3maa3kcar6hspj2zd82as7q-qtbase-5.14.2/lib/libQt5Sql.so.5.14.2 /gnu/store/59dq1n4wj3maa3kcar6hspj2zd82as7q-qtbase-5.14.2/lib/libQt5DBus.so.5.14.2 /gnu/store/59dq1n4wj3maa3kcar6hspj2zd82as7q-qtbase-5.14.2/lib/libQt5Core.so.5.14.2 -lrec 
make[2]: Leaving directory '/tmp/guix-build-my-cpp-app-0.1.1.drv-0/build'
[ 72%] Built target test_DataAccessLayer
make[2]: Leaving directory '/tmp/guix-build-my-cpp-app-0.1.1.drv-0/build'
[ 72%] Built target test_AsyncTaskRunner
make[2]: Leaving directory '/tmp/guix-build-my-cpp-app-0.1.1.drv-0/build'
[ 72%] Built target test_RecDB
[ 74%] Linking CXX executable test_PackageManager
/gnu/store/89rj5fqcg48afgk99639ds602pgf92k4-cmake-minimal-3.16.5/bin/cmake -E cmake_link_script CMakeFiles/test_PackageManager.dir/link.txt --verbose=1
/gnu/store/rn75fm7adgx3pw5j8pg3bczfqq1y17lk-gcc-7.5.0/bin/c++   -Wall -O2 -g -DNDEBUG  -rdynamic CMakeFiles/test_PackageManager.dir/test_PackageManager_autogen/mocs_compilation.cpp.o CMakeFiles/test_PackageManager.dir/tests/TestPackageManager.cpp.o  -o test_PackageManager  /gnu/store/59dq1n4wj3maa3kcar6hspj2zd82as7q-qtbase-5.14.2/lib/libQt5Test.so.5.14.2 lib_my-cpp-app.a /gnu/store/59dq1n4wj3maa3kcar6hspj2zd82as7q-qtbase-5.14.2/lib/libQt5Widgets.so.5.14.2 /gnu/store/59dq1n4wj3maa3kcar6hspj2zd82as7q-qtbase-5.14.2/lib/libQt5Gui.so.5.14.2 /gnu/store/59dq1n4wj3maa3kcar6hspj2zd82as7q-qtbase-5.14.2/lib/libQt5Network.so.5.14.2 /gnu/store/59dq1n4wj3maa3kcar6hspj2zd82as7q-qtbase-5.14.2/lib/libQt5Sql.so.5.14.2 /gnu/store/59dq1n4wj3maa3kcar6hspj2zd82as7q-qtbase-5.14.2/lib/libQt5DBus.so.5.14.2 /gnu/store/59dq1n4wj3maa3kcar6hspj2zd82as7q-qtbase-5.14.2/lib/libQt5Core.so.5.14.2 -lrec 
make[2]: Leaving directory '/tmp/guix-build-my-cpp-app-0.1.1.drv-0/build'
[ 74%] Built target test_PackageManager
make[1]: Leaving directory '/tmp/guix-build-my-cpp-app-0.1.1.drv-0/build'

```


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Package building with gcc-10
  2020-11-16 12:48 Package building with gcc-10 Hamzeh Nasajpour
@ 2020-11-17 15:45 ` zimoun
  2020-11-18 18:17 ` Jan Wielkiewicz
  1 sibling, 0 replies; 3+ messages in thread
From: zimoun @ 2020-11-17 15:45 UTC (permalink / raw)
  To: Hamzeh Nasajpour, SuarezMiguelC via

Dear,

On Mon, 16 Nov 2020 at 16:18, "Hamzeh Nasajpour" <h.nasajpour@pantherx.org> wrote:

> I have a cpp Application that should be build with
> `gcc-toolchain-10.2.0`. I could build it in local. But seems that in
> package building the `cmake-build-system` is using the
> `gcc-7.5.0`. How can I set a specific version of gcc for building my
> package definition?

You need Package Transformation, from the command line:

   --with-c-toolchain=package=toolchain

or from the package definition: package-with-c-toolchain


The manual entries about the topic:

<https://guix.gnu.org/manual/devel/en/guix.html#Package-Transformation-Options>
<https://guix.gnu.org/manual/devel/en/guix.html#index-package_002dwith_002dc_002dtoolchain>


Hope that helps,
simon


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Package building with gcc-10
  2020-11-16 12:48 Package building with gcc-10 Hamzeh Nasajpour
  2020-11-17 15:45 ` zimoun
@ 2020-11-18 18:17 ` Jan Wielkiewicz
  1 sibling, 0 replies; 3+ messages in thread
From: Jan Wielkiewicz @ 2020-11-18 18:17 UTC (permalink / raw)
  To: Hamzeh Nasajpour; +Cc: SuarezMiguelC via

You can add gcc-10 to package inputs like this:
("gcc" ,gcc-10)


Jan Wielkiewicz


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-18 18:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-16 12:48 Package building with gcc-10 Hamzeh Nasajpour
2020-11-17 15:45 ` zimoun
2020-11-18 18:17 ` Jan Wielkiewicz

unofficial mirror of help-guix@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guix-user/0 guix-user/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guix-user guix-user/ https://yhetil.org/guix-user \
		help-guix@gnu.org
	public-inbox-index guix-user

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.gnu.guix.user
	nntp://news.gmane.io/gmane.comp.gnu.guix.user


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git