Bug 178537 - science/avogadro upgrade to 1.1.0 problem
Summary: science/avogadro upgrade to 1.1.0 problem
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Raphael Kubo da Costa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-12 18:30 UTC by Troy
Modified: 2013-05-14 21:20 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Troy 2013-05-12 18:30:00 UTC
I tried to upgrade to 1.1.0 and it's failing. I contacted the named port maintainer Troels Jacobson and he said he no longer maintains the port.  I also posted it to the ports mailing list and got no responses.  

avogadro-1.0.3_2                    <   needs updating (port has 1.1.0)

[ 65%] Building CXX object libavogadro/src/extensions/spectra/CMakeFiles/spectraextension.dir/spectradialog.cpp.o
Linking CXX shared module ../../../../lib/crystallographyextension.so
/usr/bin/ld: spglib/libspglib.a(spglib.c.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
spglib/libspglib.a: could not read symbols: Bad value
*** [lib/crystallographyextension.so] Error code 1
1 error
*** [libavogadro/src/extensions/crystallography/CMakeFiles/crystallographyextension.dir/all] Error code 2
[ 65%] Building CXX object libavogadro/src/extensions/spectra/CMakeFiles/spectraextension.dir/uv.cpp.o
Linking CXX shared module ../../../../lib/spectraextension.so
[ 65%] Built target spectraextension
1 error
*** [all] Error code 2
1 error
*** [do-build] Error code 1

Stop in /usr/ports/science/avogadro.
*** [build] Error code 1

Stop in /usr/ports/science/avogadro.
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade20130510-68389-1uxumdh-0 env UPGRADE_TOOL=portupgrade UPGRADE_PORT=avogadro-1.0.3_2 UPGRADE_PORT_VER=1.0.3_2 make
** Fix the problem and try again.
** Listing the failed packages (-:ignored / *:skipped / !:failed)
        ! science/avogadro (avogadro-1.0.3_2)   (unknown build error)

How-To-Repeat: Doing a portupgrade of avogardo-1.0.3_2 to 1.1.10 yields the output above.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2013-05-13 00:32:04 UTC
Responsible Changed
From-To: freebsd-amd64->freebsd-ports-bugs

ports PR.
Comment 2 Raphael Kubo da Costa freebsd_committer freebsd_triage 2013-05-14 20:55:27 UTC
Responsible Changed
From-To: freebsd-ports-bugs->rakuco

I'll take it.
Comment 3 dfilter service freebsd_committer freebsd_triage 2013-05-14 21:10:36 UTC
Author: rakuco
Date: Tue May 14 20:10:28 2013
New Revision: 318197
URL: http://svnweb.freebsd.org/changeset/ports/318197

Log:
  Fix the build on 64-bits systems.
  
  Add "-fPIC" to the compilation lines if `uname -p' returns "amd64"
  (FreeBSD's case).
  
  The patch has been submitted upstream.
  
  PR:		ports/178537

Added:
  head/science/avogadro/files/patch-git_f518cdf4d281ac6da124b179a7f9b4b71ca90cb0   (contents, props changed)

Added: head/science/avogadro/files/patch-git_f518cdf4d281ac6da124b179a7f9b4b71ca90cb0
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/avogadro/files/patch-git_f518cdf4d281ac6da124b179a7f9b4b71ca90cb0	Tue May 14 20:10:28 2013	(r318197)
@@ -0,0 +1,41 @@
+From f518cdf4d281ac6da124b179a7f9b4b71ca90cb0 Mon Sep 17 00:00:00 2001
+From: Raphael Kubo da Costa <rakuco@FreeBSD.org>
+Date: Tue, 14 May 2013 23:03:57 +0300
+Subject: [PATCH] Treat "amd64" as a possible value for CMAKE_SYSTEM_PROCESSOR.
+
+The BSDs (and maybe OS X) report 64-bits sytems as "amd64" instead of
+"x86_64", so accept that value when deciding whether to pass -fPIC to the
+compiler too.
+---
+ libavogadro/src/extensions/crystallography/spglib/CMakeLists.txt | 2 +-
+ libavogadro/src/extensions/swcntbuilder/tubegen/CMakeLists.txt   | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libavogadro/src/extensions/crystallography/spglib/CMakeLists.txt b/libavogadro/src/extensions/crystallography/spglib/CMakeLists.txt
+index fb88316..8ee7d71 100644
+--- ./libavogadro/src/extensions/crystallography/spglib/CMakeLists.txt
++++ ./libavogadro/src/extensions/crystallography/spglib/CMakeLists.txt
+@@ -20,6 +20,6 @@ add_library(spglib STATIC ${spglib_SRCS})
+ set_target_properties(spglib PROPERTIES COMPILE_FLAGS "-w")
+ 
+ # Set -fPIC on x86_64
+-if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
++if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64" OR "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "amd64")
+   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC"  )
+ endif()
+diff --git a/libavogadro/src/extensions/swcntbuilder/tubegen/CMakeLists.txt b/libavogadro/src/extensions/swcntbuilder/tubegen/CMakeLists.txt
+index 0cd0c3e..62adfe3 100644
+--- ./libavogadro/src/extensions/swcntbuilder/tubegen/CMakeLists.txt
++++ ./libavogadro/src/extensions/swcntbuilder/tubegen/CMakeLists.txt
+@@ -19,7 +19,7 @@ add_library(tubegen STATIC ${tubegen_SRCS})
+ set_target_properties(tubegen PROPERTIES COMPILE_FLAGS "-w")
+ 
+ # Set -fPIC on x86_64
+-if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
++if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64" OR "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "amd64")
+   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC"  )
+   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC"  )
+ endif()
+-- 
+1.8.2.3
+
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 4 Raphael Kubo da Costa freebsd_committer freebsd_triage 2013-05-14 21:10:41 UTC
State Changed
From-To: open->closed

Fixed, thanks.